You seem to think the US government is a single monolithic entity. It isn't. Laws are passed by Congress. The Commander-in-Chief of the armed forces does not create laws. The issue under discussion, which you apparently don't understand, is the obligations of members of the armed forces in the increasingly likely situation that the the Commander-in-Chief gives orders that contradict the law.