That's because in a foreign country, the military is not constrained by the US Constitution. It's a 14 page document, if you read it some time you'll find out about states rights.
I see. Maybe you can post that 14 page document where foreign countries have no rights.