They also know that they are duty bound to defy an illegal order, that's well established.
Milley and others hated Trump with a passion and it is not absurd to think that they could move against the President which is clearly illegal. What would they feel is their higher duty?