If you don't know what an antihero is, Google defines it as "a central character in a story, movie, or drama who lacks conventional heroic attributes."
I.e., a bad good guy... or a good bad guy.
Antiheroes are my absolute favorite type of character, as evidenced by my attraction to slightly darker fiction and the nature of many of my own characters. The reason I take such pleasure in reading/writing about antiheroes is because they seem to provide the most conflict. They are neither good nor evil, possess no clear moral compass, although the story usually dangles a promise of veering one way or the other. Getting attached to an antihero is no straightforward task (although I usually find myself doing it no matter what). They are puzzles, and darn good ones at that.
My favorite examples of antiheroes are Cassian Andor from Rogue One: A Star Wars Story, and Ciel Phantomhive from Kuroshitsuji (Black Butler).
(Minor spoilers below!)
Cassian's first scene in Rogue One involves him receiving important intel from a source who's clearly only half-reliable. Given the political climate of their surroundings, it's not surprising. However, since the viewer already knows Cassian is aligned with the Rebels, it is a surprise when he murders the contact so that he himself can escape uncaptured.
From the start, the viewer has mixed emotions about Cassian. On one hand, he is fiercely loyal to the Rebellion and ultimately wants to bring down the corrupt Empire, but on the other hand, he is willing to do terrible things to make that happen. He even admits this toward the end of the movie: "Some of us... most of us, we've done terrible things on behalf of the Rebellion ... Everything I did, I did for the Rebellion. And every time I walked away from something I wanted to forget I told myself it was for a cause that I believed in."
There are several points in the film where the viewer is still unsure whether or not they can trust him. This makes for an incredibly emotional experience, since we as the audience are forced to debate about how we feel about him real-time as the plot develops. This is prime storytelling.
Additionally, Ciel Phantomhive from Kuroshitsuji is just as compelling (if not more). At age 12, he forms a contract with a demon in order to avenge the death of his parents. Throughout the following 134 manga chapters, his character doesn't simply develop toward goodness and forgiveness, as one would expect. The reader discovers just how willing Ciel is to murder, plunder and destroy anyone who gets in his way. He uses Sebastian, the demon, to perform his every whim, especially when it comes to cheating his way through situations.
However, he also displays moments of weakness and affection for the people around him. For example, in the Book of Circus arc, he infiltrates the circus to save the children. What he does in order to do that, as terrible as it is, is an extension of that instinct. Those glimmers of multifaceted behavior, especially as the lead protagonist, keeps drawing the reader in for more.
In short, the antihero is one of the most complex character types, and certainly one of the most fun to read and write about. I thoroughly enjoy casting many of my characters in gray light. Why read something straightforward when that one character can throw everything off and rip apart a reader's heartstrings? Writers certainly love to obliterate the heartstrings. What better character to accomplish that than the antihero?