In the book Schadenfreude Richard H Smith examines the way in which feeling satisfaction or even pleasure in the pain or misfortune of another can be based upon a sense of justice: “we think people who are responsible for their misfortunes also deserve their suffering, and schadenfreude is a common response.”
When we see someone get a painful comeuppance, we have a sense that justice has been done. It is cheer when the monster who has caused such pain is finally the recipient of pain.
While this is not the only basis for schadenfreude, it is a significant and understandable experience.
What cannot be as easily explained is why? We can argue that justice is useful. But then is justice enacted, particularly striking justice a matter of satisfaction for those who witness it?
It is curious that we are built for this satisfaction. It is also interesting that those who inflict suffering on others routinely justify their wrongdoing on the ground the other person deserved it. And so even in the wrongful injury of another there is an attempt to appeal to justice however perverted that appeal may be.
This would suggest that justice is not merely pleasurable but is even a need to see enacted.
This may also help understand the cruelty and viciousness some may express when they perceive injustice.
Finally we see that a desire for justice can easily go askew. Where the criminal may appeal to justice to justify a crime, we know the true judgement may be wrong even when the mechanism which desires justice functions.
Update: I read an interesting application of the need for justice in a quotation from John Piper: