I've long pondered a similar question - why are there so many Indian and Pakistani women in SWE in comparison to western women? Are Indian/Pakistani women better than western women in engineering? Is the education there better? How are these countries successful in mitigating this gender gap?
My theory is that this is actually caused by sexism and gender discrimination. There are smart, intelligent women everywhere, but due to sexism many career options have been traditionally closed for women in these societies, while SWE (as a completely new field) isn't. Their high numbers can be explained by the lack of opportunities in other areas. If you're an intelligent woman in Pakistan, IT is one of the few ways to prosper, meanwhile a woman in the West has way more opportunities.
I think it used to be the same principle with science in EE. Like, you're a highly intelligent person, you strive for success and recognition. In US, the classic path is entrepreneurship, but that was pretty much closed / very difficult in the Soviet block. You could get into politics, but you have to bend the knee to the party line. Science is one of the few avenues where you can thrive intellectually, get recognition and keep yourself relatively unaffected by politics.
There is a general finding that women go into engineering fields (and other relatively high-paying fields) more the poorer their country is. Neither "software engineering" nor "India / Pakistan" is an exceptional case; there is no reason to look at the specifics of the field or the region.
Usually the theory is that women everywhere hate engineering, but poor women may suck it up and go into engineering anyway because they need the money.
I agree this has an effect as well - software engineering is one of the few fields which provide good living in those countries.
However, coming from (relatively poor, but relatively gender-egalitarian) Eastern Europe, female engineers aren't anywhere close to the amount in e.g. India and Pakistan, so I don't think it can explain the disparity completely.
My theory is that this is actually caused by sexism and gender discrimination. There are smart, intelligent women everywhere, but due to sexism many career options have been traditionally closed for women in these societies, while SWE (as a completely new field) isn't. Their high numbers can be explained by the lack of opportunities in other areas. If you're an intelligent woman in Pakistan, IT is one of the few ways to prosper, meanwhile a woman in the West has way more opportunities.
I think it used to be the same principle with science in EE. Like, you're a highly intelligent person, you strive for success and recognition. In US, the classic path is entrepreneurship, but that was pretty much closed / very difficult in the Soviet block. You could get into politics, but you have to bend the knee to the party line. Science is one of the few avenues where you can thrive intellectually, get recognition and keep yourself relatively unaffected by politics.