(from adrimagyar @ Flickr)
Why would genes want to promote the welfare of other unrelated genes? Thanks to Trivers we know this happens because it is indirectly selfish. The bat with food that offers it to the bat without stands a greater chance of living when the tables turn. He'll live, find a sexy lady bat, have bat babies and so his genes multiply (including that/those responsible for that behaviour).
This explanation works well for non-human animals but it loses its potency when it comes to humans. All sorts of explanations have been put forward. One interesting area within all this is 'altruistic punishment', where someone will incur a cost to punish freeloaders. This is theorised to have cooperation-enhancing effect.
The authors of a paper in Science wondered whether the people who were punished would later take revenge against their punishers. The nature of the results depended on the society you were from. The USA, UK, Germany, Denmark, Australia and Switzerland all seem content to shun revenge. Oman, Greece, Saudi Arabia, Russia, Belarus, Istanbul, South Korea and the Ukraine all showed high levels of revenge for being punished.
As Prof. Simon Gaechter, explains “Our results correlate with other survey data in particular measures of social norms of civic co-operation and rule of law in these same societies. The findings suggest that in societies where public co-operation is ingrained and people trust their law enforcement institutions, revenge is generally shunned. But in societies where the modern ethic of co-operation with unrelated strangers is less familiar and the rule of law is weak, revenge is more common." (source)