You're talking about different groups of women. The women who want to help the world don't usually go into accounting or law (except maybe environmental law or criminal defense), they go into teaching, social work, etc., which generally pay poorly, or they go into medicine, where they can make very good money (probably better than programming) and directly save peoples' lives too. The women who want to make money go into law, accounting, and medicine (some overlap here with the help-the-world group obviously).
>What makes you assume that all women want jobs where they can be social?
This has been shown by research. Women are trained from an early age to be more social than men.
>And what makes you say programming isn't a social job? It requires working with other people as part of a team.
I don't think I need to justify myself here. Most programming involves sitting at a computer and typing, and not in a group in real-time. It also certainly has a reputation for being asocial, though that's changed more recently with the "brogrammer" trend, but not for the better as far as women are concerned. It sure as hell isn't social the way medicine is, where the work is all about meeting one-on-one with patients all day long and working hands-on (usually literally) with them.
>Women get rejected from law and med school too. That doesn't explain why they don't go into software.
Well, for the med school rejects, I can't imagine what programming would offer them. They obviously want 1) a high-paying career, 2) to help people hands-on, 3) a social job. Programming might offer 1, and that's it. Women like this will probably fall back to nursing school, or maybe some other career that's more social and less technical than programming.
Really, the only good point you bring up here is that a lot of women go into accounting, since that does indeed seem to have a lot of overlap in career traits with programming.