I've been in relationships with 2 women who could code, but who absolutely didn't want to do that as a job. (They formed these ideas well before they met me.) I also taught 100 level Computer Science courses at University, and encountered many young women with similar attitudes. There is something going on in our culture which makes women not want to code as a job.
Liana K covered some of this in an even handed way, even as the fury was still running hot: https://www.youtube.com/watch?v=BIRvtA2JIIA
Google should have not touched the live wire that is a public policy for PR brownie points.
I suspect that they were invaded by large numbers of employees with an agenda who have what they feel is a moral mandate, who won't take no for an answer, who furthermore feel they are justified in toxic and intellectually stifling behaviors by their moral mandate. People are taught in college and socialized in online groups that it is their moral duty to pursue this agenda and take such actions. Given the scope of the reactions I saw come out of Google during the Damore furor, I think it's basically too late for them. I'd hope to be wrong, but I see little hope.
I don't think Google is wrong for trying to recruit more women. Their problems have to do with how their efforts have manifested in their internal culture in a way which stifles free inquiry and dissent. If it hasn't already happened it's only a matter of time before they succumb to stagnation and only run off of their market position and network effects. Also, as we have seen with other media companies, at some point in their decline, the decline will motivate behaviors which are harmful to society at large. I suspect this process has already begun.