Regarding the cause, I'll admit right off the bat I am agnostic about it. I don't know if there's an innate predisposition, and I don't have any strong belief one way or another. If I had to make a guess, it is probably a small statistical difference in the disposition of interests made larger by the very common predispositions to identify with people according to gender & to cultivate their interests according to who they identify with, leading people to gain their interests from friends, parents, peers, famous figures & authors of their own gender, all creating a rather intricate feedback loop until it becomes embedded in the cultural associations and stereotypes, by which point you can add fictional characters to that list as well.
I have no problem with grass root cultural efforts to counter this: If a media outlet wants to publish a yearly list of the top 100 women in science, or a kick starter wants to get young girls interested in electronic circuitry with flowers you can get to glow and play musical notes, that's fantastic, they are utilizing free speech and the free market exactly for the utilitarian purpose our liberty to do so has become a protected cultural value in the first place, the fundamental understanding that the human condition limits us from ever being certain about how things should be and applying a totalitarian answer, and so society benefits the most from giving all it's different pieces the freedom to explore different directions and experiment with different answers as long as they don't take away that freedom from each other.
If it turns out it is cultural association in regards to femininity and masculinity and that logic circuits in flowers provided girls with a gateway drug into STEM, that's fantastic, and we will all get the benefit of what they are able discover, engineer & develop. But, if they aren't interested and it turns out to be just a small niche market, that needs to be fine too. If reality made any promises to always prove our hypothesis and beliefs correct we wouldn't need the vast majority of people in STEM to begin with. More importantly: No harm was done.
The same can not be said about the top down approach. Believing that gender distribution should be equal so strongly that we'd hammer it in with gender quotas, attempt to censor cultural ideas that could oppress our delicate subconscious mind, and yes, even having gender-specific schooltrips in the classrooms of public schools that jixmixfix was talking about (And I suspect might be part of the RL chain of events that inspired this thread), are crossing a line with the use of enforcement. I've also explored the issue of gender requirements for scholarships, it can be rationalized, but not lightly. Almost any reasonable argument for the legitimacy of the practice can equally be used to support arbitrary gender requirements in the work place. Creating inequality in opportunity in order enforce an equality in result completely flies in the face of personal agency. In the end of the day, regardless of whether people are making their choices because of nature or nurture, it's still their choices.