charity is about signaling your fitness to others. (like everything else)
While this is undoubtedly a factor, it fails to be a complete explanation, given that much charity is anonymous, and anonymous charity has no obvious utility for signaling. It would also imply that those who are happily married would tend to be significantly less charitable, which AFAIK is not true.
Charitable organizations like the Gates foundation aren't interested in quick "band-aid" fixes, for exactly the problem you raised. They're interested in long-term sustainable programs that don't just help today, but also improve life for future generations.
A good example is malaria eradication. The Gates foundation has targeted malaria for complete destruction on a global scale. This means assisting current victims, yes. However, if they meet their goal even partially, the lives of future generations will be improved. Permanently.
A good anecdote about Bill Gates is when Douglas Adams went to solicit funds for a Mountain Gorilla conservation program. Gates asked how much it would cost. Adams started giving him estimates for the first year, and then Gates cut him off. He said, "No. How much to solve the Mountain Gorilla problem. Forever."
That's the current attitude. If it doesn't work past the current generation, it's probably not worth doing. We've acknowledged that, and have moved on.
Microsoft isn't necessarily worthy of contempt, but I don't respect what they do now. They've lost it. Apple hasn't, at least not yet.