It sounds like there's a problem with the incentive structure for the company. Ideally, the threat of a lawsuit should incentivize the company to address the problem; but the HR department acted as though addressing the problem would increase its legal liability. But I don't know enough about sexual harassment law to understand what causes this. Maybe addressing the problem would mean acknowledging it exists, and acknowledging it exists would make it harder to defend against a lawsuit? Would it be possible to reform the laws around sexual harassment so that the HR department actually has incentives to side with victims?