The military is subject to order and discipline. When you are told to do something, you do it. If anyone decides they are going to argue they will lose. Doesn’t matter where you are.
Bottom line is this marine was told to do something and didn’t comply. She decided to be insubordinate. Insubortination is a court martial offense.
>> When you are told to do something,
That something must satisfy the Constitution.