One typical story is some savage earthling meets up with an advanced alien race that tells him that.
It certainly is a staple in the Star Trek series. They have had several stories like that. Arena is just one example.
But is mercy and kindness really an advance trait? I know that the Roman Empire was known for its brutal efficiency. Frankly so was the US. In fact we installed this bloodthirsty dictator, Pinochet, in Chile because a dictatorship was judged to be more stable.
And while we’re at, even if mercy/kindness isn’t advanced per se, why do people assume it is (cf. Star Trek)? And where did that idea originate?
I think that to some extent it is, in that it along with altruism is a luxury commodity. So long as your basic needs are met, it is not to difficult to be merciful and compassionate to others, since even it there is a cost of doing so you are still going to be ok. If on the other hand you are struggling to have your basic needs met, then being compassionate for others may come back to bite you. Since generally our standard of living is increasing, we are generally able to afford more resources on luxury items that are not directly related to our individual survival, including compassion and kindness.
As far as the Roman empire goes, it isn’t as if the people they conquered were more compassionate or ethical. Its just that the Romans were more powerful and so could do unto others before others did unto them. As far as the US goes, the fact that we are at all concerned about civilian casualties indicates how far we have come. If we were really fighting for our lives in Iraq and Afghanistan, we would carpet bomb the place like we did to Germany and Japan in WW2. The fact that we even attempt to win hearts and minds is because we aren’t really in a war for survival.
It most likely didn’t originate with any religion. It is likely to be an adaptation of large-brained, complex thinking social species and we see aspects of it in other animals. It seems to aid survival of the species and thats the only explanation needed.
Religions may have codified it in terms of a deity or other supernatural bunkum but it was there before the need arose to explain it. We wouldn’t have reached that point if it weren’t.
Social mammals of many species show empathy and kindness toward their own group at minimum, sometimes outsiders, and even other species. Dolphins, wolves, horses, apes, corvids are some examples I can easily think of.
There isn’t anything special to humans about compassion, except our abstract extension of it to whole categories people we have not even met nor are likely to.
It only has to be present in a large enough proportion for it to be beneficial to the species as a whole.
There are always going to be behavioural points along a spectrum and outliers. How successful are those outliers? If enough people behaved without empathy and altruism how successful would our proto-societies have been? How attractive to a mate were those outliers? would they not simply have been ostracised from the tribe?
Humans are empathetic and altruistic in general because such behaviours have been to the benefit of the society in general.
Stereoscopic vision has also been useful to us, but some people are still born blind.