100% of the Computer Science majors at the last place I was a prof were women. Seriously.
Okay then, now that I have your attention.
“Back in my day…” the ratio of women in CS grad schools was quite good. Better than any other Science. There were virtually no undergrad CS programs then. (Also, my “grandmother” in my thesis advisor tree is the first person to get a PhD that says “Computer Science” on it.)
Then the undergrad CS programs started to swell in the early 80s. Virtually all of the new people were males. So, while the number of women increased, the proportion changed tremendously.
The Culture Changed very quickly. Things got nastier, more competitive. The focus on being good at certain things was valued highly, but being good at other things was dismissed. Hardly anyone did anything to try to fix this.
But during the 90s things started to improve some. Web page design, user interfaces, etc. attracts women. But still a ways to go.
It’s pretty much a standard thing that happens in all societies. One group becomes dominant. They look at what they are good at and declare that the Best Thing To Be Good At, etc. It’s just like the biases in IQ and SAT tests.
(It is quite interesting to note that women make up the majority of students in most sciences. 20 years from now, that’s going to completely change the makeup of faculties. And then it’s only a matter of time before guys start the “Science? That’s for sissy’s I’m going into English!”)