A new entry on MetaFilter offers various links searching for the origin of altruism.
A new study suggests that humanity’s sense of fair play and kindness towards strangers is determined by culture, not genetics. Speculation: the finding may be directly related to the rise of religion in human history, as well as more complex economies. (Via).
On the other hand, perhaps we learned it from dogs.
Where does your sense of giving come from?