What's interesting to me is that male dominated fields tend to be those that are a free-for-all, that require no special credentials or vetting. This is not limited to tech, but seen across a wide variety of industries. Does this simply mean that men are more likely to be found in these careers because those are the jobs they are able to do?
In a perfectly free market, where anyone was free to do whatever job they wanted, perhaps we would see an even distribution of genders? But in this very non-free labour marketplace we have, with many artificial barriers to entry, perhaps that is what has lead to this disparity not only in the careers with those barriers, but also those without, rather than any specific gender having a preference for certain types of work?
And, fundamentally, what changed in those professions is they accepted that it was them that needed to change to be more attractive, not some failing in girls.
To be clear, I'm not suggesting that they're paragons of equality because they aren't. But in the specific question of attracting girls, even ones who like "girly stuff", they have solved that problem admirably.