Darwinians often argue that natural selection fosters altruism. For instance:
In evolutionary biology, an organism is said to behave altruistically when its behaviour benefits other organisms, at a cost to itself. The costs and benefits are measured in terms of reproductive fitness, or expected number of offspring. So by behaving altruistically, an organism reduces the number of offspring it is likely to produce itself, but boosts the number that other organisms are likely to produce.
On this view, social ethics is based on empathy or compassion, which is based on evolutionary psychology.
On the face of it, there's a problem with that explanation. It's easy to imagine hominids who cooperate out of perceived self-interest rather than altruism. To take a comparison, consider military alliances. Heads-of-state who despise each other, or neighboring countries whose citizens despise each other, may pool their collective resources to combat a common enemy. That doesn't require a capacity for empathy or compassion. Indeed, they can to right back to killing each other once the more pressing threat has been eliminated.