It's also a side-effect of the "communist cultural heritage"... Engineers were quite respected in communist societies (at least in EE & Rusia), and women were also welcomed/forced to join the industrial workforce (because industry was inefficient and required tons of labor).
Hence, a smart woman wanting high social status kind of had two options: become an engineer or a doctor. First option was easier and also less painful (doctors were also subjected to nasty shit like having to relocate to unpleasant places without choice because there was a demand for their services there, some areas like surgery were also much less women friendly etc.).
Also, dunno about Rusia, but in Eastern Europe, even now, there is a good "girls in math" story. Maybe less in physics or computer-science, but in pure and applied math there's lots of girls. Probably most of the smart ones jump ship more towards finance than tech though, when they realize they can't really get a nice paying job with a math degree alone.
Here's a recent article about it:
http://www.bbc.com/news/business-39579321
In the west, the woman is traditionally the housewife.