Also, most of the discrimination in STEM happens later in life, in the workplace - the only real effect of getting more girls into STEM is to have a larger pool of women entering STEM careers so you still have some left after driving a bunch of them off. Businesses donating to STEM-for-schoolgirls programs is a way for them to assuage their conscience (or to do PR) without having to ask what they can be doing directly to solve the actual problem.
And I'm afraid this increases the perception that men are naturally fine at STEM and women need special support because of inherent gender attributes (and not because of social problems that we could just address at the root)... which at the end of the day makes life harder for women in their careers.