 Under UCMJ, the Uniform Code of Military Justice, there's laws that don't apply to civilians. They only apply to the military. They're strictly written for the military. And one of them is Article 134, which says that you can get in trouble for doing something they find unbecoming.