A protagonist does not have to be pleasant or morally admirable. The better test is whether the story makes that character compelling, understandable, and worth following.
Villains often command attention because they carry a story’s strongest desires, contradictions, choices, and moral questions. Here is how to recognize that effect without confusing fascination with approval.