Difference between oil and software is that you can easily quantify oil (1 barrel) whereas it is tremendously hard to quantify the value of software product.
Google is an ad company. 91% of their revenue comes from selling ads. They just happen to be an ad company that started with a successful search engine.
All the amazing software Google develop is to support their ad business, more or less.