Even though what I say might sound a bit stupid, I think it's because of style. Everybody that I work with is a geek. If you always thought of yourself more of a guy who is a lawyer, serious, likes to dress well, you will probably want to run away from being a software dev. They generally like to geek out, look weird, look smart or whatever.
Then you might have less geeky people and companies, but the overall sentiment that I get is that who does "computers" are geeks, nerds, people with glasses and so on.
Being a male myself, I saw how rare are geeky-type of girls, and usually how many males usually one gets attention from(lots!). It's not that there aren't many, there are many geeky girls, but the pool, in comparison to men, is big. Maybe it's just my eye, but at least I saw how much lonely man there is due to this fact, they lookout for a geek girl, see how much competition there is, much more to the attractive ones and then end up alone. 4chan is an example of this.
And this is mostly regarding to culture. The stuff we watch, the stuff our parents talk with us, it has too many factors. In the end, you are a geek. Or you are something else.
So I think that either tech has to look less geeky(how to?). Now that I've grown up, I'm less interested in being a geek, I've started to look up to fashion and a range of other things which I didn't when I was younger, but it was when I was younger that I've picked my profession and many other do.
I've started to discover that there was a lot of stuff I was missing out, I've never had money to buy clothes for myself, now that I do, I pay attention to what people wear, how to they act and so on. I talk to my wife and she teaches me many things. As time passes, I actually distance myself from the prototype of people who I work with.
To my very small knowledge of lawyers, they behave very very differently from IT people in general. Some people might be more attracted to becoming one, for example. It feels more mainstream. I think that when we make this kind of choice, it's more like we want to fit in. Nowadays, after years of working experience, I think that even me, I would pick something else, even though I love coding, studying new programming languages and so on, but I could as well be as productive somewhere else, maybe being a lawyer or a doctor, why not?
As a software dev you are also expected some kind of weird labour, you are always building, your leadership capabilities aren't so well tested. For many, they would even like if you would just code. I don't like the industry so much anymore. I feel that the industry enjoys the way that it breeds very smart people which would rather be given orders(or pseudo-orders, in a SCRUM cycle or whatever agile methodology) versus actually taking up responsibility from very early on your career.
Coming back to my argument, people when deciding on what to do on their life, they chose something which they want to belong, generally. Girls because of their experience and what they get bombarded by media end up choosing different stuff. There are rare cases though.