This is a great observation, and the worst is this doesn’t just happen with gender, over history this has happened with race, religion, ideology, etc.
I think this has to do with a very primitive and tribal mechanism (that while partially biological, unacceptable) that gives a sense of superiority to the things that seem fundamentally similar (be it ideologically or physically) to you, over things that are opposed to you (because well, you know, narcissism knows no limits).