Easy example - any girl who started reading the HN message boards at a young age would probably give up on a future career in engineering. Why try when a bunch of educated men don't think you can succeed?
The article is interesting but not definitive. Even granting ( which I wouldn't ) that girls have a greater aptitude for reading instead of science and math, being a good _engineer_ is also about being a good reader. If boys are naturally better at math, that doesn't at all mean they are better professionals. If they can't read the instructions for using Vivado to design firmware, than they are in the wrong profession.
I've also rarely encountered commenters on hacker news saying women cannot succeed in engineering, and it's downvote heavily in the rare instances it does appear. You claim it's present in this thread, in your previous comment, yet don't link to any instances of this alleged disparagement. It strikes me as the kind of statement that stems from assumptions rather than concrete observations.
The disparity with places like the middle east is an example of the gender equality paradox [1]. The more patriarchal and oppressive a place is, the greater women's interest are in high paying fields as it provides a path to security and independence. In more egalitarian societies, women are more free to pursue fields in accordance with their own iterests.
1. https://www.theatlantic.com/science/archive/2018/02/the-more...