Sam Underwood as Zach Hamilton and Michael C. Hall as Dexter Morgan in “Dexter.” (Randy Tepper/Showtime)

Watching a serial killer plunge a giant knife into table-bound victims wrapped in plastic may not seem like an enjoyable way to spend an hour, but for the past eight years, “Dexter” made it work. The grisly, critically acclaimed Showtime drama ends Sunday, and now, we’re left to ponder why we were not only intrigued by but why we celebrated a show with such a violent, dark premise.

Dexter” launched in the age of the anti-hero. After Tony Soprano but before Don Draper and Walter White, Dexter Morgan took his place among TV’s iconic, beloved bad guys. Traumatized as a small child when he witnessed his mother’s gruesome murder, Dexter’s damaged psyche became his greatest source of power. Thanks to a strict code developed by his adoptive father, Dexter channeled his violent urges into a double life: a friendly police department blood-spatter analyst by day and Miami’s top vigilante killer by night, taking care of criminals that the legal system let slip through the cracks.

Viewers and critics were mesmerized by Michael C. Hall’s steely performance as the titular character. Ratings grew each year, and the show racked up award nominations. Fans made “America’s Favorite Serial Killer” T-shirts. Stores sold Dexter action figures and bobbleheads.

For a show to be that popular, the audience has to relate; for the audience to relate, there has to be some emotional connection. The obvious, troubling query would be, why do people feel attached to a man who commits such heinous crimes, even if they are against deviants? It’s a question frequently explored by the show’s fans: Is it normal to feel sympathy for a (fictional) psychopath?

The creators of “Dexter” tried to explicitly frame the show so that the audience would think yes.

“Every step along the way, we’ve tried our best to always root where Dexter is in first asking ourselves, ‘What are the normal questions, or the normal wants or desires of a human being?’ ” executive producer Sara Colleton recently explained during a segment on Sundance Channel’s “The Writers’ Room.” “Then, you refract that through a prism of Dexter Morgan. It gives the audience a way in a very safe environment to explore their own nature.”

Colleton drove it home: “We all have some aspect of ourselves which we are terrified of letting it see the light of day.”

“Dexter” played on that theme as a way to make its lead character sympathetic while relating to the average person. All Dexter wanted was to be normal, but that chance was stolen from him as a child. So he had to pretend. He watched, as an outsider, carefully learning to imitate how “regular” people acted, which led to the show’s darkly comic moments, narrated by Dexter’s monotone voice-over.

In the end, what helped make Dexter more human was his increasing lack of control. His sleek exterior started to crack as he learned more details about his horrific childhood and wound up having a family of his own.

Now, as “Dexter” wraps up, we wait and see whether he will be part of the final body count. Things don’t look good, as he must tangle with one final enemy before trying to leave the country with his soul mate, Hannah (Yvonne Strahovski), and young son, Harrison. No matter the ending, “Dexter” is going out with the same central emotional theme that drove the show, even through the gruesome framework: the search for real, human happiness.

Will “Dexter” really kill off its title character? As much as anyone wants to believe it can’t happen, it’s hard to forget the conclusion of the fourth season. Dexter arrived home to find his wife, Rita, (Julie Benz), dead in a bathtub filled with blood, his baby son crying hysterically right next to it.

“Born in blood, both of us,” Dexter said in a voice-over during the haunting scene. “I thought I could change what I am, keep my family safe. But it doesn’t matter what I do, what I choose. I’m what’s wrong. This is fate.”

(one hour) series finale airs Sunday at 9 p.m. on Showtime.