I'm picking on Google, but they are not alone. Amazon, yahoo, ebay, aol. Any large business that uses web as means of providing services and making revenues is enjoying enormous savings by using open source stack on their back end. And what do they contribute back? A good approximation of zero compared to benefits they reap.
So, what does Amazon contribute back? There might not be much in terms of mere lines of code - dead software that doesn't do anything for you - but in terms of real data and a living, growing and scalable service it's huge. Amazon is host to 50M products and makes these available via Web Services - simple HTTP and XML. No amount of source code distribution would enable third-party developers to equal this feat. There's no real magic here in the software (complex and customized as it is), the value comes from the actual data and the actual 24x7 support of the service. We could describe the algorithms used to create product authority, but without 10s of millions of products the algorithm is useless. In this business, content is king.