There’s just something infinitely interesting about evil.
Heroes are all well and good, but let’s face it, if they are merely heroes (and not anti-heroes existing in a story of skewed morality or reformed villains themselves) their one layer of goodie goodness can appear a bit flat. They may be the most lovable, honourable character to ever set foot upon a page, but that doesn’t make them intriguing. Also, the story will often be told either from their own perspective or centring around their workings. The bad guy looms on the edge as a menacing shadow. They’re a mystery.
And people love mysteries.
Like, why is this guy such an asshole? Was he/she made this way by some trauma of their childhood? Or is he/she merely inherently evil? What inspired them to want to take over the universe and/or cause the general unhappiness of other people? Or are they just an unthinking agent of chaos? Or perhaps an Eldritch Abomination?