When I reported for duty on a submarine as a young officer, I was shocked to see that the XO had his girlfriend on the ship. He would bring her down to stay overnight and of course his wife never found out.
The CO moron took it to another level and he may find it ends his career, but don't bet on it.
Reminds me of Cary Grant’s line in the movie Operation Pettycoat, “The law protects below age 18, mother nature protects after age 65, but in between they’re fair game.”