Even though the military expects Marines to be faithful to their spouses, there is no formal discipline that I have ever heard of in my 13 years of being in the military world as a result of adultery.
Eons ago adultery was definitely considered a no-no.
http://www.sldn.org/templates/press/record.html?section=5&record=3694
March 15, 2007
Naughty Soldiers: What Does the Military Consider ‘Immoral Behavior’?
Slate.com
by Christopher Beam
Gen. Peter Pace, chairman of the Joint Chiefs of Staff, compared homosexuality to adultery in an interview with the Chicago Tribune on Monday. “We prosecute that kind of immoral behavior,” he said. What other kinds of immoral behavior does the military prosecute?
You name it. Bigamy, sodomy (with either gender), wrongful cohabitation, gambling, dueling, indecent exposure, indecent language, indecent acts, pandering, prostitutionall of these are considered crimes under the Uniform Code of Military Justice. If you’re an officer, you’re also subject to “What other kinds of immoral behavior does the military prosecute?”
a general prohibition on “conduct unbecoming an officer and a gentleman.”
This rule, as interpreted in the military’s 900-page courts-martial manual, can be used to prosecute things like cheating on tests, stealing, public drunkenness, failing to support your family, and reading someone else’s mail. To top it off, the military can also prosecute anyone for anything that damages the “good order and discipline in the armed forces” or makes them look bad.
According to The New York Times, July 21, 1998: Adultery is a crime under military law and enlisted personnel convicted of adultery could be discharged for bad conduct. Defense Secretary William Cohen, however, wanted to reduce prosecutions for adultery. He wanted - I do not know if he achieved it - for commanders to file charges of adultery only if they felt it disrupted morale or functioning of the unit - it Cesar's case it sure did. Cohen also wanted that enlisted personnel discharged for adultery no longer automatically lose all benefits and pensions.