Google didn't release Android to make money. In fact, Google has released many programs that lose money. Google in general, is not in it to make money. They manage information, and create technology. Much of what they do they make open source.
The advertising bit is simply the 'necessary' result of making everything free, not their 'raison d'être'. They've constantly given the middle finger to their investors, and somehow still constantly grow.
Android's entire reason for existence is to become the new computing paradigm. To replace PCs, servers, etc... Google has also recently announced version 1 of their own programming language, 'Go'. Again, a step towards a (hopefully) brighter computing future.
You can't measure Google's success in dollar terms, because that's not what they set out to do. And you can't compare iOS to Android in terms of dollars, numbers, etc... Android is beloved by many because it CAN replace a computer - I can do everything I need to do on my phone - though a few things are still somewhat clumsy.
And it's very easy to completely avoid Google services on an Android phone, and never see a Google Ad. So looking at where Google makes it's money is completely missing the point.