Money spent by Google in open source projects through GSoC projects is the one thing that keeps me from boycotting my use of Google products (due to invasive privacy and such matters).
It's probably a ridiculous asymmetry.
Google gives back much more than most companies. Who cares how much they make from open source? Its not like open source comes with a price tag.
So when you fix some bug google may host that product 'as a service' where google profits and you don't.
Isn't earning with opensource software pretty much the best outcome for OSS? It keeps people paid to maintain it while actively giving out - e.g. see how many 3rd party browsers (not to mention Electron apps) were able to grow based on Chromium, how many Android-based devices are out there, how many projects benefit from libraries like GTest, TensorFlow. Not to mention contributions to Linux kernel.