Everything we do, we do because somehow it benefits us.
We go to work for the satisfaction (I hope) and because we get paid. We smile at a stranger because it feels good to be nice (and perhaps we’ll get a smile in return). We pick up litter when no one is looking because telling ourselves a story about being a good person is worth the effort.
Some people have figured out that charity is an incredible bargain. For the time and money it costs, the benefits exceed what could be attained in almost any other way. A bargain compared to chocolate, or an amusement park visit or buying a shiny new car you probably don’t need.