Google is a public company. The money either goes to shareholders or to employing people. There is no conceivable world in which this money would have gone to any of those causes.
I don't know if we prefer a world in which Google itself made these kinds of contributions and not the people who own Google.
Conceivable, but we probably won't get there anytime soon.
Capitalism is a best that needs insatiable ever growing revenue and profits.