Development looks like a boys club from the outside. Changing that perception will require active effort from the inside. No one puts in the effort because "We aren't sexists! We love women! (We love women so much! [Please, women, come talk to us!])" Apparently liking women forgives being completely incapable of creating an inviting environ.
None of this comes as a big surprise to anyone who knows developers. Right leaning people who are overwhelmingly from privileged backgrounds and spend most of their time absorbed in a subculture that places pride in technical accomplishment above manners. This is not a group to expect a warm welcome from, especially if it means that they might have to tell less crude jokes, or take down some objectifying imagery.
But sure, it could be a natural aversion. That's a studied hypothesis with thousands of hours of research behind it showing...something, somewhere...right? The truth must be somewhere in the middle, I guess.