Batman and Joker have the most unique and interesting relationship in all of comics. Their core conflict is a philosophical one. Joker wants Batman to break his rule and become like him: a killer. Batman knows Joker is the reflection in the mirror of what might be – if he crosses that line where he takes lives, he becomes Joker (Mark Millar explored this in his comic, Nemesis, where the title character is Batman if he were like the Joker). The mirror metaphor continues in their attire that I mentioned earlier: Batman the hero wears black and looks like a villain; Joker the villain wears colours in an image traditionally associated with innocent amusement.
Batman would arguably not be the world’s most popular hero without Joker, whose presence and actions have forced the Dark Knight to go above and beyond his skill set to superhuman levels in order to stop the Joker. Without Joker, Batman’s morals mean nothing because they wouldn’t be tested so intensely and so often. Batman doesn’t kill but because he doesn’t kill the worst person in the world – despite the countless opportunities – it makes him all the more the better person and a true hero.
Great villains are great characters and great characters are more complex than the sum of their parts. As much as Joker is a great villain, he’s also a great character too thanks to his many layers including his mysterious origins, his weird motivations, and his adaptability to cause havoc in any situation.