Humans evolved to crave schadenfreude because curiosity and desire for justice are both helpful to reproductive success in group settings (e.g. tribes).
Media 'hacks' this evolved instinct for schadenfreude by manufacturing bad people so readers satiate their craving for 'justice' by gorging on the missteps of others.
This is harmless entertainment in works of fiction, but destructive and counter-productive in reality.