I've also seen this in the six years I worked in the UK as a developer, before starting my PhD. Of the women developers I worked with, (in this case, not so many) the majority were Indian or Eastern or Southern European. The same goes for the students in my data science Masters (also in a UK university).
Other women I've discussed this with, have similar experiences. In particular Greek women (like myself) don't remember any perception of a strong bias in numbers against women in STEM subjects. I have a fair few Greek women friends who have bachelors or master's degrees in computer science.
All this is of course anecdotal but it makes me think there is some sort of bias that is not explained by "interest in things" vs "interest in people", or any such difference between the sexes, because it is particular to specific cultures, rather than to the sexes around the globe.
In any case "gendered interest" sounds like a convenient oversimplification that seeks to confirm cultural bias as natural and spontaneous, rather than an attempt to understand it. Instead of answering any questions it passes the buck; it leaves someone else to wonder why girls and boys are interested in different things (e.g. fire trucks vs barbie dolls). The same goes for academic performance in school: that is also an observation that requires an explanation- not an explanation in and of itself.
You won't see lots of indian students studying philosophy because once you are done you have to go back. Bad monetary investment.
Want a better life = study engineering. The explanation is as simple as that.
Even so, why are there more of those technical immigrants female than the locals? That the majority of visas granted are for technical fields doesn't tell us anything about the gender of those who obtain them. There's nothing stopping 100% of immigrant IT workers from, e.g. India from being male. Why are they not?
Also, I'm not sure the assumption that visas are only granted to technical workers is correct. My experience is from the UK and I don't know what happens in the US, but over here, immigrants do all sorts of jobs. For example, many doctors and nurses in the NHS (the National Health Service) are from India or the EU; the majority of agricultural workers are from the EU; plumbers, famously, are all Polish; catering workers are from the EU; etc etc.