It's About the Numbers
A small percentage of people are arseholes, and a small percentage of those are people who find it acceptable to say and do sexually-inappropriate things to other people, including their colleagues. The more time you spend in the company of people who have decent moral standards, the more likely you're going to buy into that level of behaviour.
If you've got a company where the gender balance is 50/50, the five creepy blokes are likely to be misbehaving to a number of different women (or other blokes, or women misbehaving to men, or other women).
In a company with a strong gender bias to male, that creepiness is focussed on one woman, because she's the only victim available. Compound it by the fact that there isn't a balancing effect from the collective team that "this isn't okay", and it becomes a default behaviour that the wider group normalises. Until the woman gets to the point where it isn't tolerable any longer and makes a complaint (slightly different topic but you all know that a domestic violence victim tolerates being hit 42 times before they call the police, right?).
There is a awesome collection of nerf guns in one room in my building. The team are banned from using them on a regular basis, then it becomes Friday afternoon fun, then end of the day fun, then a free for all, then someone gets hit and complains and the ban comes back in. I'm one of only two women who goes into that room on a regular basis; none of the guys have EVER shot at us. Every male visitor - fair game. Discrimination? Yeah maybe. But they've all seen the sharpness of my heels - if I throw one of them back it's going to hurt a great deal more.