How has altruism evolved?

There are two friends, one of them will definitely die and the other one will survive if he runs,

if not, he’ll most likely die too.

He chooses to stay and fight to save his dying friend.

As much as it is a noble and an admiring thing we would all love to be able to do,

I am curious, what makes us sacrifice our own chance of survival in favor of somebody else’s?

How has altruism evolved?
Post Opinion