I was discharged more than 30 years ago, but adultery was definitely against the UCMJ at the time. I don’t recall if it was listed in the same section as the regulations against homosexuality (and related “undesirable” behavior,) but I do know it was theoretically an equal offense, so of course all the service members openly committing adultery were getting discharges at the same time I was getting kicked out for being queer.
Oh wait, no they weren’t! How silly of me. For some odd reason these “offenses” weren’t treated equally. I wonder why?