My parents softly discouraged my sister from playing with Legos as a kid because "girls like pretty things."
Now of course, a lot of software in the US is below 20% female and we easily end up with spirals where departments end up lower than that and develop a toxic environment that pushes each new woman out. I personally ended up majoring in math instead of cs because of that process at my college.
I would hesitate to advance any theories as to cause based on that data (e.g., Denmark - part of Scandinavia - is >50% and Finland - not part of Scandinavia but next to it - is <30%).
Scientists and engineers overall include a lot of disciplines that are not CS. Biology in particular is frequently majority female.
I guess the interesting point of discussion here is "personal inclination". A lot of my female friends have stories about how their parents encouraged their brothers to fix things around the house, get their hands dirty, read manuals, and set up new appliances. They tell me how they were, conversely, encouraged to make friends, maintain relationships, and steered toward more aesthetic pursuits like art, drama, or music.
My sister, at an age when she had no strong interests of her own, was given paintbrushes and nice paper as gifts by our parents but not Legos because they felt like girls were more likely to enjoy aesthetic things than mechanical things. Funny enough, as an adult she has neither mechanical nor aesthetic interests. The question I guess is how much of "personal inclination" is driven by these small decisions of what options we give to kids.
I will say my experiences are colored by the fact that my family is a low-income immigrant family in the US from a culture with definite gender discrimination and so they hold stronger gender prejudices than probably a high-income Scandinavian family. My guess is also that younger generations have grown up with a much better idea of gender equality and will raise their kids with less of this prejudice.
I also observed in my school that a lot of women felt more comfortable in the math department than CS (though CS had much less prestige compared to now), so thanks for your story and background.
The US spends more per student than any other country, by a lot. Money is very clearly not the problem.
BTW, if you condition PISA scores on racial groups, any racial group (black, white, asian, whatever) scores higher in the USA than in any other country, except Hong Kong.
I've heard this, but will fully admit I don't know how real this is. For one, the US generally has the highest COL in the world, so it's bound to spend more per student than any other country. Moreover, the general concern I've seen is that badly funded school districts in the US are much worse off than well funded school districts. Moreover gender disparities are not as bad in well funded school districts.