It is no secret that women in nations where software engineering is likely to be a significant source of employment are far more socially attuned than men are; whether this is by nurture or nature is grist for another mill at another time. It is also no secret that software engineers rank lower on social validation than doctors. Empirically, look at a sampling of org charts, and statistically, pure software engineers (not counting Fellow-type positions, for example) rarely call the shots. Not that they should as a rule: I'm pointing out the reality.
Regardless of the US reality for doctors, with the constraints imposed upon them by the dysfunctionally-broken US healthcare policies, the social perception of doctors is "doctors call the shots". The phrase "doctor's orders" carries enormous cultural weight behind it.
To empirically test a weak form of this hypothesis, compare the number of women managers who were originally trained as programmers to women software engineers. If there is a statistically significant deviation, then some Maxwell's Demon-like mechanism at work performs a sorting function that emerges this deviation, gradually exerting an inexorable pull upon women programmers into management. A stronger experimental confirmation of this hypothesis would require someone with far more training in such psycho-social factors discrimination to devise an experiment to empirically test.
I'm not discounting the very real challenges women software engineers face. Personally, I have not witnessed first-hand any of the workplace vibe-killers described, and I've been in a lot of different workplaces by dint of my wandering consulting career, but I can believe it happens because I've also seen some really bad behavior in the species, and generally I tend to attract clients with pretty solid corporate cultures. But women tend as a statistical aggregate to pay attention to the nuances of social rankings far more than most men realize, and especially men in software engineering realize.