I always find it a little staggering when people start tracing back profits or motivations to prove a point, but stop as soon as their point is made. If you want to employ a systems thinking view of the world to make a point, you need to chase the rabbit all the way down the hole.
Google didn't create all that wealth. They took a large part of that wealth from other advertising companies - primarily newspapers. And that money came from companies which in turn came from consumers. A good part of the wealth of companies is from arbitrage, monetising previously non-tradable items and digging stuff up - you know, externalities. A good portion from consumers is intergenerational. Very little actually comes from wealth creation.
Wealth is for all practical purposes, finite. This does not mean it is fixed. As a previous commenter pointed out, global economic growth is increasing at 3-4%.. at least some small portion of this is due to wealth creation rather than the monetisation thing. Understand also that monetisation usually transfers wealth rather than creates it, but sometimes can actually reduce wealth overall (take say, tobacco companies as a non-controversial example.. a controversial, though equally true, example might be BP or Shell).
Then you start asking yourself, if wealth is largely finite.. and some companies are making money hand over fist, then surely someone must be losing out? Why exactly do you think there are people living around the world who cannot afford good healthcare or clean water? You think they are just lazy? You actually believe all that BS in the doco you watched?
It also amazes me when people point out how generous US companies and people are in philanthropy - generally 1-2% of profit - while completely turning a blind eye to the very low levels of tax they pay. The democratic-capitalist-welfare state has a bigger positive impact worldwide to population health than all the charities put together, and it can be cheaper to run.
And another thing, you think google giving the doctors 500k is actually significant? In addition to the $400m / 80% figures already pointed out, think about the individual contributions - peoples life work. Also from wikipedia, in 07 there were 26,000 professionals who helped MSF. I don't know if you are aware, but people who work for charities don't get paid as much.. and that is if they are not just volunteering their time. Say 26,000 x 10% pay cut x ave wage (in aus dollars with aus wages this would be about $130m, you can adjust elsewhere if you like).
130 million a year in wealth donations from ordinary people.
I am all for wealth creation, which I think was the crux of the OP - if you are not contributing value to people's lives, you are not creating wealth, just taking it from someone else. And I don't discount the efforts of the people you mention. I think companies like google have helped in other ways with more impact than just their cash. Just want you to see these efforts in context, and maybe think a bit deeper. Because it is a very long rabbit hole.
And because it irritates me.