The original compute-ers, people who operated computing machines, were mostly women. At that period of history, most typists were women and their skills seemed to transfer from that job to the next. As late as the second half of the 1960s, women were seen as naturals for working with computers. As Grace Hopper explained in a 1967 Cosmopolitanarticle:
It’s just like planning dinner. You have to plan ahead and schedule everything so it’s ready when you need it. Programming requires patience and the ability to handle detail. Women are “naturals” at computer programming.
But then, this happened:
Computer programming was masculinized.
The folks at NPR, who made the chart, interviewed information studies professor Jane Margolis. She interviewed hundreds of computer science majors in the 1990s, right after women started dropping out of the field. She found that having a personal computer as a kid was a strong predictor of choosing the major, and that parents were much more likely to buy a PC for their sons than they were for their daughters.
This may have been related to the advertising at the time. From NPR:
These early personal computers weren’t much more than toys. You could play pong or simple shooting games, maybe do some word processing. And these toys were marketed almost entirely to men and boys. This idea that computers are for boys became a narrative.
By the 1990s, students in introductory computer science classes were expected to have some experience with computers. The professors assumed so, inadvertently punishing students who hadn’t been so lucky, disproportionately women.
So it sounds like that’s at least part of the story.