One possible explanation for this phenomenon is that people may use the misfortune of similar others as a way of reducing their own self-threat. By seeing someone similar to themselves fail or experience misfortune, people may feel that their own position is more secure or that their own failures are less significant. In this way, the misfortune of similar others can function as a form of self-affirmation.
Schadenfreude: Deriving Pleasure from the Misfortunes of Others
Donna L Roberts, PhD (Psych Pstuff)