It's not like saying that. This is literally Google donating money to charity. That's the definition of being charitable.
Even so, many would agree that Facebook and Google are charitable for giving their products away for free even if they extract value from them in other ways.