There are many things to say about this trope:
Very simple, and the younger the Fangirl, the truer it becomes. Villains often show the dominance, the rugged and wild physique, and the aloof Jerkass attitude that most teenage girls crave and that Heroes are much less likely to have. They wish to become the villain's Dark Mistress so they can feel protected and validated in their worth for having been able to inspire love in a monstrous man's heart. Being accepted by such a man means you're worthier than any other woman on earth.
2. The high status of Love Martyrs among females (and, sometimes, among males).
Let's be honest, girls love to drown themselves in a sea of hormonal emotions. Most Fan Fictions featuring a Draco in Leather Pants often make him a Bastard Boyfriend who turns into a Reformed Rake in the end, through The Power of Love. Many teenage girls want to be on an emotional rollercoaster and feel constant insecurity about whether or not their boyfriend loves them. It makes them feel alive and gives them the feeling that they have a purpose in life. Being strong enough to love a man forever, no matter what he puts you through or what he does to other people makes you a respectable and admirable woman. Hence the glorification of Love Martyrdom, which is what most villains guarantee.
3. Reverberation of high status.
Villains are often ambitious. Since most of them often become kings, emperors, or have some form of authority, girls dream about being the respected dark queen at their side, whose high status ensures that no one will ever be disrespectful to her or disobey any order she may give as the Dark Lord's lady. In other words, the freedom of being a bitch and not getting any flack for it.
While the girls see the villain as an escapist romantic interest, the Fanboys also like the position the villain is in: ambitious, cool, and at the head of a dark organization with minnions under their heel, slathered with riches and sensual sex objects and aiming for domination. The villain serves as an Escapist Character for them.
4. Evil Is Sexy.
It's true for men. Femme Fatales and Vamps are often considered "hot" by Fan Boys. While the heroine may look pretty, she doesn't ooze sexuality like villainesses tend to do, since, as we all know, a sexually active woman is not wife-material. Since this is inverted for males, the sexiness male villains ooze is often inherent and switches on many girls' desire to be dominated and literally owned by a bad man. Love Martyrdom often involves Sex Martyrdom and other kinds of unsavoury things. All of this is nullified if the villain is physically unattractive, though.
5. I Can Change Him.The inverse of #2, in this case it's the feeling that the girl's (or guy's as well) love is capable of changing the Draco. All Girls Want Bad Boys, but just as much as that, all girls fantasize of being the flame that thaws that bad boy's frozen heart. It makes them feel special because they captured the heart of the aloof bad boy and made them theirs alone.
6. Double Standard of Heroism and Villainry.
We often hold the heroes to a higher standard, because we expect them to be good and to put in their all to be that good. Since villains do not have any sort of moral obligation, we won't call them out for doing something minor like we would the hero. Because of this lax double standard, the villains are more free to be the Large Ham or be cool, sexy, or interesting in the usual villainous ways since Evil Is Cool and Evil Is Sexy. Unless they cross the Moral Event Horizon, we are less likely to disdain them for doing something morally questionable (they're already bad) than we are to the heroes.
7. Double Standard and villain's gender.
As one can notice, we mostly talk about girls and women when it comes to people who invoke the trope. The reason? Count the female villains who get sexualized for the same deeds compared to the male ones. It seems Fanboys are hardly as sensitive to the Draco in Leather Pants effect as Fangirls are. If a female villain is sexy enough, she may be turned into a Lust Object, but rarely will boys and men wax eloquent about marrying or changing her. And, as one could expect, girls and women will just hate her for being an evil bitch when most of them would be fapping at the sight of a sexy man doing the exact same thing.
Though this is in no way universal, and in fact it's often inverted with a different double standard: female villains are excused for actions a male villain would be torn apart for simply because females are supposed to be naturally good-hearted.
8. Visual Aspect of Attraction, Objectification, and Internalization of Stereotypes.
Attraction to a potential mate's physical appearance is the main factor in human mate selection, male or female. If a character is hot, people are going to want them. There is no question that male fans lust after attractive female villains just as much as female fans lust after attractive male villains. The difference is that male fans objectify the female villain, which is to say, they view her purely as a sex object, making her personality irrelevant. Female fans, on the other hand, feel the need to justify their attraction by finding or inventing personality traits that would make the villain lovable or worthy of a real relationship. This could be explained by our culture's widespread objectification of female bodies (men are used to enjoying the sight of women without having to think about the women in question as people), as well as the stereotypes that boys and men are highly visual and only interested in sex, while women and girls are less visually oriented (studies show that women are actually more turned on, faster, and by a much wider variety of visual stimuli than men) and only interested in relationships (explained by both upbringing, and the quality of sex men are willing to provide based on their relationship to the woman involved). The over-valuing of romance and stigma attached to sexuality which is ingrained in girls from infancy leads them to confuse sexual attraction for romantic interest, and thus teen girls (who write a huge percentage of fanfic) have an unfortunate tendency to think they are in love with every cute guy they see.
9. Loving other aspects of a character *in spite of* evil actions.
The Draco in Leather Pants phenomenon implies that fans who find a villainous character cool, sympathetic, or attractive generally do so *in spite of* that character's evil actions, rather than *because of* them, since DILP fanworks seldom depict or glorify those actions in themselves. These fans love Emperor Evulz not because they think trying to Take Over the World, torturing the heroes, and executing your unsuccessful minions is awesome, but because Evulz is well written, funny, brilliant, has a compelling (often tragic) backstory and compelling personality, and is classy and stylish and just plain hot. They love Evulz for all the reasons one might love any character; the more sensible ones are well aware that Evulz is actually a bad guy, are uncomfortable with his more evil actions, and are either having fun with exploring other aspects of his personality or are writing "soft alternate universe" fic in which Evulz is good. Sometimes you'll see fanworks tagged with "Good!Evulz" or the like to indicate the latter. (The less sensible ones, of course, are the ones arguing that Evulz really is actually a good person in his canon portrayal and he was justified in kicking all those dogs.)
- It is possibly a real-life example of All Girls Want Bad Boys (most victims of this trope are male). Characters of this type are also often prime repositories for being a fetish, so softening their darker aspects may, in some cases, be a fan's self-justification for their own Perverse Sexual Lust.
- It's also true that many villains (especially nowadays) come with some story attached that does make them seem more sympathetic. This can sometimes cause fans to zero in on that and forget that the characters are still supposed to be villains.
- In fairness, more than a few authors have written morally ambiguous characters, then acted surprised when sections of a fandom embraced them as heroic. The personal nature of morality means that actions one person finds to be equatable to dog-kicking will seem perfectly justified, even pragmatic, to another, especially if it's of the Designated Evil variety. This is especially common with the Magnificent Bastard and the Designated Villain. This can be especially true if the setting is a Crapsack World or World Half Empty: in a state of moral ambiguity, if the heroes are not good, and the bystanders are not innocent, audiences will naturally root for the coolest character.
- As mentioned on the main page, some villain archetypes, such as the Smug Snake (because of their off-puttingly arrogant personality), the Generic Doomsday Villain (because of their complete lack of a personality), the Hate Sink (because they are specifically written to be hated), and the Complete Monster (because of the severity of their evil deeds and absence of redeemability) are rarely susceptible to this, but it can still happen.
- And sometimes, it simply proves that some girls and some guys will completely ignore someone's horrid deeds and personalty, simply if they find them sexually attractive.
- Many villains also imply with their actions that they are physically strong/healthy/fit (at least strong enough to become a serious problem for the heroes), and physical strength and the possibility of becoming an alpha male is always a trait which makes people physically attractive in a biological way.