Most likely, the Marines found out when he was arrested for Solicitation or was caught trying to molest a lower rank.
NY Times foodie Craig Claibourne served in the Navy in WW2 and Korea and he said homosexuality was more accepted in the service as long as you kept quiet about it. Especially if your steady lover had a wife.
Of course, Craig Claiborne had incestuous relations with his father (or so he claimed) so who knows?!