Reward grows from gratitude, and punishment from resentment. An act deserves reward when a fair onlooker would share the gratitude of the person helped. It deserves punishment when that onlooker shares the victim’s resentment and can’t enter into the motives behind the harm.
From The Theory of Moral Sentiments by Adam Smith