This is so flagrantly sexist that it's absurd. But luckily for Google, it's the politically correct form of sexism. It's been decreed that programming being male dominated is bad, and thus taking sexist action to fix it is okay.
This of course totally ignores that university education as a whole has become majority female, and many professions are becoming majority female that didn't used to be. That by and large we're doing a lousy job of educating boys is not considered a problem, so making that problem worse by trying to exclude them from one of the areas they still do well in is considered okay.
Sure, it's total BS. But it's PC BS, and that's good enough, right?