When the behavior of an officer is not proper the Army will get involved. This is the article from the Uniform Code of Military Justice that gives thenm the authority:
Article 133—Conduct unbecoming an officer and gentleman
“Any commissioned officer, cadet, or midshipman who is convicted of conduct unbecoming an officer and a gentleman shall be punished as a court-martial may direct.”
Elements.
(1) That the accused did or omitted to do certain acts; and
(2) That, under the circumstances, these acts or omissions constituted conduct unbecoming an officer and gentleman.
Explanation.
(1) Gentleman. As used in this article, “gentleman” includes both male and female commissioned officers, cadets, and midshipmen.
(2) Nature of offense. Conduct violative of this article is action or behavior in an official capacity which, in dishonoring or disgracing the person as an officer, seriously compromises the officer’s character as a gentleman, or action or behavior in an unofficial or private capacity which, in dishonoring or disgracing the officer personally, seriously compromises the person’s standing as an officer. There are certain moral attributes common to the ideal officer and the perfect gentleman, a lack of which is indicated by acts of dishonesty, unfair dealing, indecency, indecorum, lawlessness, injustice, or cruelty. Not everyone is or can be expected to meet unrealistically high moral standards, but there is a limit of tolerance based on customs of the service and military necessity below which the personal standards of an officer, cadet, or midshipman cannot fall without seriously compromising the person’s standing as an officer, cadet, or midshipman or the person’s character as a gentleman. This article prohibits conduct by a commissioned officer, cadet or midshipman which, taking all the circumstances into consideration, is thus compromising. This article includes acts made punishable by any other article, provided these acts amount to conduct unbecoming an officer and a gentleman. Thus, a commissioned officer who steals property violates both this article and Article 121. Whenever the offense charged is the same as a specific offense set forth in this Manual, the elements of proof are the same as those set forth in the paragraph which treats that specific offense, with the additional requirement that the act or omission constitutes conduct unbecoming an officer and gentleman.
(3) Examples of offenses. Instances of violation of this article include knowingly making a false official statement; dishonorable failure to pay a debt; cheating on an exam; opening and reading a letter of another without authority; using insulting or defamatory language to another officer in that officer’s presence or about that officer to other military persons; being drunk and disorderly in a public place; public association with known prostitutes; committing or attempting to commit a crime involving moral turpitude; and failing without good cause to support the officer’s family.
Lesser included offense. Article 80—attempts