Women just like some majors more than others. For whatever reason, they dominate (source):
Health Professions;
Social Work;
Education;
Psychology;
outnumbering men by at least 3-to-1 in all of those fields. Each woman who spends all of her time studying to become a doctor is a woman who isn't studying to be a computer scientist.
The clear common ground between those four fields is that they're highly social and focused on helping others. By contrast, men dominate the fields that are perceived to be the least social, i.e. Computer Science and Engineering.
There's also some variation based on how math-heavy a field is; for example, women are relatively more likely to do Biology than Physics. But, that effect doesn't appear to dominate. For example, women are fairly well-represented in Math and Physics. Also, women may choose Biology more often because it's a popular major for students planning to go to med school.
Asking students directly
If you're an instructor in high school or college, then you have direct access to students around the time that they're making their study choices. So, asking them what they want to do and why seems like a good path toward personal understanding.
You're probably going to hear stuff like "I want to help others" more from the women and "I like computers" more from the men. Ultimately, their major will be their choice, so it's all about understanding what they want.
Two big peaks for CS degree obtainment, regardless of gender
Looks like CS degree granting has gone through two big peaks during this time:
The first peak, around 1985, is before my time. However it's my impression that there was a major loss of momentum around those years. The term "AI winter" was coined in 1984, suggesting that pessimism was prevalent enough to assign it a name in discussion. Presumably this pessimism dissuaded incoming college students from selecting CS, causing the drop a few years later when they graduated.
That second peak looks like it's centered around 2004/2005, suggesting that students were really optimistic about Computer Science around 2000/2001. And those years were the peak of the dot-com bubble, which started its clear burst in late-2000. It seems probable that the dot-com bubble bursting dissuaded incoming students from going into CS then, too.
Females in specific also followed this trend, and had the same peaks:
The peaks look more pronounced for women; presumably if we had a graph of just men, we'd see their enrollment had a milder response.
I'd speculate that this implies that women cared more about the optimism/pessimism about Computer Science happening at the time than men did. This is, optimism had a stronger pull to get women in, then pessimism also pushed them out harder. This push/pull effect can be seen in the relative CS degree obtainment plot:
As shown, women chose CS relatively more often until the peaks, then relatively chose other majors after the peaks.
Not a bad thing
So women like being medical professionals more than programmers - awesome! As long as people are freely choosing what they want to do, then that's exactly what we should be striving for.