A lot of the early CS-related workforce was actually made of women, because dealing with mainframes was originally seen as an extension of typing and shorthand (secretarial work traditionally reserved to women) with some math on top. Sometime around the early '70s / early '80s, the field morphed into the male-dominated world we see today.
This has been discussed on HN in the past, usually in threads about female CS pioneers working at NASA and so on. I believe the consensus is that there wasn't a single individual cause for the change, but rather a number of conditions changed around the same time, discouraging women from CS-related jobs.