Depending on what part of Google you work for, you can absolutely feel good about what you do. The vast majority of employees don't work on ads or adjacent areas. I've never seen another company actually care for non profit related externalities so much. People talk about it like it's the same as Haliburton or Oracle and that's not true.
The snide response is "of COURSE you can care about non-profit related externalities when your giant evil ad business is bringing in absolute dump loads of cash".
And there's something true there; few companies are Snidely Whiplash evil (maybe the lawnmower but even that is just what it is) - and having large amounts of cash affords you options in many areas.