Some of it is the British - particularly English and Welsh - education system. We specialise far too early, particularly for those of us who are all-rounders. I would have happily taken more subjects, but I was only allowed to take 8 GCSEs (including English, English and maths) and only 3 A-levels.
I was determined from about age 12 that I was going to be an industrial archaeologist, and one of the qualifying undergraduate degrees for that was history, so that helped shape my A-level and degree choices. I was at a single sex school, so quite a few friends did do maths and sciences, and having had a grandmother who took maths at Cambridge in the days before women were allowed to have degrees, and later taught maths and physics in a girls' grammar, I never knew anything of rubbish ideas that boys are better at sciences. But I just didn't have room in my timetable. Also, chem seemed to have lots of organic chemistry at A-level, and I was more interested in the inorganic side, though I don't know if that was a fair representation.
On graduating from my first degree, I ended up realising I needed a roof over my head, so had to work, rather than fo a masters. From there, I ended up with a boyfriend in IT, and also my first use of email (it was 1993) - I'd never really used computers, because the one BBC micro at school was for the sole use of those doing A-level maths. And from that, I ended up doing an MSc conversion in Computer Science, and have worked in IT ever since till being made redundant in January.
I don't really want to work in tech again. It gets tiring being criticised for the exact same things your male peers are praised for, for having to fight for equal pay over 50 years since it became law. Assumptions I must be the secretary, not a Unix sys admin, being cheered when I went on a computer storage course, because women never do, vendor field engineers commenting on how unusual it is to see a woman in the datacentre... all well-intentioned (except the secretary thing,) but still othering. Colleagues who insist women are too emotional and can't think logically, despite having it pointed out that it was a man who burst out swearing in a meeting and the only temper tantrums I've seen in the office have been from men.
I've done a lot of work on women in tech (including pointing out we don't need to encourage women into STEM, we need to get all the men working in it to understand how they shape and affect the culture and fix that - the women are okay,) but if anyone has decided to go into a tech career because of what I've said, I doubt I did them any favours. Though if a teenager came to me and asked about working in tech, I would talk about the wide range of opportunities and different careers and how interesting it can be, and work on the assumption that it's going to get better as all the middle-aged managers reach retirement, so anyone starting now will be fine.
Men are right to worry having more women in an industry tends to push salaries down, because there's plenty of evidence that is what happens - but keeping women out isn't the solution. Just pay women fairly in the first place. Tech salaries started to go up from the late '60s once men realised there was money in it and started pushing women out. We hear of Turing, Gates, Jobs and so on, but most of the early computing pioneers were women. The fact that that history has been (partly deliberately) suppressed feeds into the issue of why people think women mostly don't do tech. (And thus I combine my two degrees.)