If a cultural problem has lack of exposure and education at its root, then it is very easy to throw money at that part of the problem and just fix it. Right now girls and underrepresented minorities are woefully underexposed to coding, and via education we can right that wrong directly even if we can't figure out how to fix the underlying cultural issues (which definitely exist, and have made white and Asian boys much more likely to have early exposure to CS).
I'll note that students tend to rate CS as their favorite academic subject (it's slightly below art and theater) when they are forced to take it, so "force" in this context is mostly just about getting them to take the first step. They love it once they start, so whether or not it will solve the gender imbalance problem, it's such a critical skill for the future economy that it seems irresponsible not to spend money on it and prepare people to participate in that economy, doubly so when students enjoy it so much.
That's not to say at all that the cultural components should be ignored, they're just so much deeper and more difficult to fix than this particular side effect, which is amenable to solution-by-education (which necessarily means throwing money around, since training teachers takes money).