It's extremely hard for women in these countries to get good careers in any field other than teaching or medicine especially since they are often forced to marry and leave the work force (they can't work without their husbands' permission and they almost always handle all child care). It is the norm for women to marry right after graduating from college and not doing so is seen as abnormal.
The combination of this results in women going to college and studying what they actually _like_ in their final years of "freedom." They choose STEM because they like it.
In the west, women are probably as inherently interested in STEM as in these other countries, but they also know that they need to get a job and they often choose career paths that would give them less pain due to harassment or discrimination.