The classical answer to this is that altruism towards strangers is not evolutionarily adaptative. This is because the altruistic give ressources benefit their own and others' descendants equally, while the nonaltruistic also get those benefits for their descendants without having to pay the cost. See also the tragic story of George R. Price.
In his blog post "Why Might the Future Be Good," Paul Christiano writes:
(Please read all of "How Much Altruism Do We Expect?" for the full context.)