On the record, the USN has a zero-tolerance policy on rape. It advertises that in order to get (gullible) women to join, since it's always in need of manpower (female or otherwise).
Off the record, rape and harassment are permitted by senior officers, as long as those senior officers efficiently execute all orders by their superiors.
The only time reports of harassment are ever acted upon are when one of those senior officers doesn't suck up to his superiors in cases where the failure to suck up cannot be easily identified as insubordination and prosecuted fast in a court martial.
At that time, and only that time, the harassment reports on that officer are dug up and he is removed for sexual harassment.
And that was likely the case w/the officer in the OP. He screwed up in his job, and so the military got rid of him by nailing him on harassment. OTOH, if he was a ruthlessly loyal, efficient officer, what incentive would uncle sammy have to remove him?