The romantic rogue
Any of you know when/where/how we started romanticizing rogues and other villains?
There's this thread in at least the European and American popular imagination of idealizing certain kinds of (often fictional, but sometimes real) criminals. There's the bold highwayman, the daring outlaw, the maverick cardsharp, the rakish con man, the burglar with a heart of gold, the honorable rōnin, the social bandit. Sometimes they live outside the law because they were unjustly accused of something; sometimes they're iconoclasts, tweaking pompous authority; sometimes we just admire their daring and pluck, their lives of adventure, their reliance on wits and charm. Pirates and vampires aren't in quite the same category, but I think both have been similarly romanticized (to varying degrees) since the late 1800s or earlier. Some people and creatures who steal and kill for a living get turned into folk heroes, admired and respected.
And I'm wondering where and when that admiration and respect entered popular culture.
The earliest example I can think of offhand in Europe is Robin Hood, but I imagine there are earlier examples, and stories from elsewhere. I suppose trickster gods (and people like wily Odysseus employing tricks to defeat or escape from monsters) are kind of in the same vein.
I understand the appeal; I'm certainly not saying this romanticizing is bad, and it's a very common aspect of modern popular culture. I'm just wondering how far back it goes, and how it manifests in non-European cultures. I feel like in most of the pre-1400 (or so) European folktales and legends and myths that I can think of, thieves and murderers are seen as bad guys. Good guys might occasionally employ tricks to get their way, but (setting trickster gods aside) I'm not thinking of characters who were admired for, or even despite, their outlaw nature. But I don't know a lot about any of this; my research thus far has consisted of Wikipedia and my own memory. So I'd be interested to hear if any of you happen to know more.