It's been shown, especially recently, that HR and legal are not necessarily on the side of employees wronged by sexism in the workplace. Harassment training is an ongoing joke.
Or are you saying in other jobs men and women are less likely to work together alone, so people might think it's more inappropriate?
Nor are they on the side of employees accused of sexism. They will do whatever is in their best interest. Which can mean both ignoring sexism or wrongfully firing the employee with no proof.
The cost of ignoring sexism is a potential PR nightmare. The cost of wrongfully terminating the accused employee is maybe a low 7 figure wrongful termination suit at the worst.
They only protect the employees when it could harm the business.