My analysis adds up to what James Damore had to say as to what happened in a WSJ article. He said his memo didn't bother many people until it was leaked, and the google HR got many complaints from the outside world.
I think the google management fired him not because of his view, nor were they worried that he questioned google's purported wasteful spending on diversity programs (which for Google is drop in the bucket if it is effective...if it is not effective I dont think they care, it makes them look good).
But google fired James because they thought he was bad for business (consumer base).