There's a number of issues here.
First, men and women tend to think differently, and have talents in different areas, just as men tend to be taller. This is a matter of biology, and on that basis alone, a reasonable mix in IT would be biased towards a greater proportion of males, depending on the exact developmental role. About 2:1.
Except it's more like 8:1 or even 12:1, rather than 2:1.In open source, 50:1.
It's no accident that there are more women in interface design, project management and architecture within IT either. Remember though that this is all statistical, just as there are short men and tall women, you should always look at individuals as individuals, not as stereotypes. Talents between the ears are what's important, and chromosomes are a poor guide to those.
Part of the problem is the discouragement talented girls experience at school because IT is a "male field". Part of it is that businesses are set up with men in mind, with stereotypically male aspects of bonding after work, of stakhanovite hours with no concession for having a Life, with hierachies and competition for "fastest gun in the west" rather than teamwork. The latter is particularly important in Open Source development.
Part of it is straight old-fashioned misogyny and the glass ceiling, but I think that's not as important as the other issues. It can get pretty bad though as a consequence of the other causes, trust me on that one. I invite all the straight guys to imagine what it would be like in a gay-only environment, with gay porn posters and bitchy jokes about "breeders", plus the occasional overt sexual harrassment and almost universal attempts to flirt. That's what it's like for many women in IT, all the time.
It's not as bad as it was. I'm 51, and can remember when things were a lot worse. Female medical students are no longer required to sign a pledge not to get married if they enter med school, as they were when I was in grade school. But Blacks don't have separate drinking fountains either, as they did then. "Better" does not mean "Good" or even "minimally acceptable".