Dammit, stupid PC, who would work in IT...
Sexism in the work place
It's definitely still out there. Some employers are good - Crossrail was mentioned above, and I've heard before they're good for female engineers - but that doesn't mean the whole industry is. Overt sexual harassment can be comparatively easy to counter, in that it's clearly wrong, but you still need to be sure of yourself to fight it, and if you're early on in your career, if you don't have much support (because you're the only woman) - sometimes, it's easier to leave rather than gain a reputation as someone who's awkward with no sense of humour. Not all sexism is overt, but it's not a coincidence that many women will be better qualified than their male peers - like it or not, women in STEM careers often do have to do that much better than the men they work with to get the same level of recognition. Not all employers are the same - but it's sufficiently widespread that it is a problem generally, not just for one or two employers.
The pipeline is also definitely a problem. Yes, most STEM fields have women in prominent positions, be it industry or academia. But you need to see women at all levels, not just for the real high-flyers who have a meteroic rise, but for the ones who work hard and get steady promotions, like many men can expect.
Knowledge of STEM careers
Many people, including educators and others, don't really have an understanding of the vast range of STEM careers. Computing is all like the IT Crowd, and science is all white lab coats and safety glasses. There's actually a far wider range of jobs than that (the Science Council have identified 10 types, and most of them need skills we stereotypically see as more female, like communication, working with other people, all the rest of it.
STEM jobs can be long hours - but many can also be quite flexible (not that all employers recognise this), so it can be fitted round family life. They're usually interesting and varied and intellectually stimulating, and can be well-paid, too. Why wouldn't anyone want that? But often, people won't consider STEM careers because they just don't have enough understanding of what's involved.
Parental input
This is massively important, and one area where cultural differences are huge - and this is a cultural issue rather than anything else - nearly all the points above come down to culture. I was talking to an Indian colleague a while back, and she just didn't get the STEM issue we have. Her parents gave her the option of doing medicine or engineering at university, else they wouldn't support her doing it. I can't imagine most British parents being that restrictive (which is a good thing), but it doesn't mean they don't have any influence. Many people go into careers that their parents did, or that they saw other family members doing, or friends' parents doing. I know there were things I never considered when I was at school, simply because I knew nothing about them and whether they'd suit me. (Actually, when I was in the 6th form, I remember saying, "I don't know what I'm going to do, but I know it's not going to be in IT or banking." I've now been in IT for nearly 2 decades, and 5 years of that was for an international bank...) There's not that wide a range of careers in my extended family, and I think most families can say the same. Children need to gain an awareness of different careers, and some of that will come from parents - but they can only talk about what they know about. Plus people have mentioned upthread how there isn't the same respect for STEM careers here in other countries.
None of these things can seem so big in themselves, but not having an understanding of what possibilities there are in STEM careers, and society telling you girls don't really do STEM stuff, and wanting to fit in, and not seeing any women in the workplace, you have to be particularly determined in a way men don't have to be.
Girls aren't making free choices. They're making choices constrained by all sorts of societal expectations.