I realize that formally Trump is the leader of the military but informally, the people in control of the military aren't necessarily Trump.
If Trump gave a direct order to a general, the general simply can change the order to be whatever he wanted it to be and who would question this general? By the time Trump figured out his general wasn't listening to him, a coup could already be successful.
Who truly has the power and trust within the military? If there was a dispute between generals and the president, who would the officers listen to ultimately? Who would they follow?
If you watched the bureaucratic moves within the Pentagon since the election you would see how the chain of command has been streamlined such that secdef, a former snake eater, is on par with the service and combatant commanders and reports directly to the commander in chief.
further, if I wanted to solidify the loyalty of my generals I would show them some of the evil things that these bastards were doing and then have them ask their subordinates, you can either trust me and obey my seemingly nontraditional orders going forward And continue to sleep at night, or I will show you what was shown to me (awful abuse and murder of children) to prove why we need to do this but you will never sleep again.