Do you have any reliable sources on that? It doesn't make much sense to back both sides in a zero-sum game and both candidates would know that. It seems much more likely that the usual sources who report "Google contributed $X to Candidate A and $Y to Candidate B" are counting employee contributions, either as an honest mistake or as a propaganda tactic to make their point. In reality, Google pays thousands of people a generous salary and each of those people have their own opinions about various issues, and so they're contributing their money, but not on Google's behalf.
In fact, this explains a lot of things. Back in the day when people got long distance telephone service from a different company than their local service, there used to be a pro-life phone company that advertised that all the other long distance companies like AT&T and MCI donated a ton of money to pro-choice organizations so you'd better switch to the pro-life phone company. But why the hell would a phone company care about abortion? They didn't, they just employed a lot of people and some of them happened to make political donations to pro-choice causes.