In your novels, is your main character always the hero - a person of principle who does good all the time? Do you think that your readers relate to this better? Or do readers want a main character that they can relate to - someone who is human and has many flaws? Respond as a writer and as a reader.
A main character who never does anything wrong is a Mary Sue character. They're hard to relate to because most of us have flaws. (And I"m not talking about bogus flaws, like "I'm so beautiful that no one ever realizes how smart I am.")
In order for there to be a character arc, there has to be character growth. In order for there to be character growth, the character has to have had an area in which to grow.
The MC of my upcoming novel murdered a child. The MC of the novel I'm polishing up now is the product of a toxic family and doesn't realize it yet, and she's overly wrapped-up in what other people think of her. The MC of the novel I've got in the early draft format is emotionally cut off after the death of her fiance two years earlier and has built her whole life around her job. So no, none of my MCs are perfect.
The hero of a work is always the main character (or characters), but he or she should never be all good or all bad. (Unless one is writing a comic strip.) We're trying to create characters who provoke a response -- whether that response is applause, anger, frustration, or joy -- as they live and breathe, succeed and fail through our words.
Your question seems to imply that there is always a good guy and always a bad guy, but that's not necessarily the case. In some forms of fiction, the "bad guy" is actually part of the "good guy" -- the part that creates tension in the character and thus tension in the book. My critique partner (I wave over at Jane L) once told me that one of my antagonists needed to have something good going on in him, even if it was just that he hasn't a clue how bad he is, or that he loves his daughter or, as in my case, that he loves birds. While he's chatting with those birds, the reader forgets, just for a moment, that he's the villain of the piece. But with or without a designated villain, characters need to be multifaceted, just as we humans are.
Our readers want to relate to the characters, imagine themselves in that situation, hate to love and love to hate according to how well we've portrayed the actors on stage.
I love the love/hate relationship. And it do find it in comic books too. Two of my favorites examples were in Kick Ass, Big Daddy who trains his 11 year-old daughter to become an assassin (bad daddy) to bring down a drug lord Frank who is also a father who tries to protect his son from becoming part of the biz.
Never, though I had one MC who appeared to be lucky at times but for every bit of luck that came his way, he got kicked down tenfold for it...cosmic balance I suppose. No character can be good or all bad. That's not real to me.
I edited a fantasy novel and argued with the author that his reason behind his villain's motivation to destroy humankind was pretty lame and she needed an overhaul. He had her as a rich spoiled brat bully who was just evil because that was her personality. He'd been dissed by wealthy girls and held a grudge. I actually told him it was his fault for aiming too high. lol... we had some fun exchanges.
I kept her a rich spoiled brat bully, until she was discovered to possess innate magical abilities (something she didn't know) and by law all people with abilities were to be shipped off to Arcanom to become soldiers in a war between sorcerers over Earth's resources. Her parents refused to help because humans were scared of "witches", so here she is abandoned in a strange place, with no worldly possessions. I let her come to rely on and embrace as a sister, a girl she had bullied once ( who was also discovered to be a witch). When the villain became a young lady, she hated both humans because she felt abandoned by the human race and witches because they feared her exceptional talent and tried to restrain it. So she made a deal with "nature" to wipe the slate clean of resource sucking vermin while she took an arc of Earth's creatures to another world for safekeeping until the Earth healed. But... "her sister" couldn't stand by and let it happen.
So in short, here's a case of a villain doing something self-serving and evil, while at the same time believing what she's doing is righteous and good. I don't think it's anything new in history, psychology, or stories, but it's real.
In the sci-fi thriller I am writing, the main character is deeply flawed at the start of the story, coke and sex addicted, ruined by success but along with everything else that will change!
In my opinion, in order to create a believable main character, someone readers can identify with, the character MUST have some flaws or, at the very least, some insecurities. Fiction mirrors reality - or is it the other way around? So, since no one in real life is perfect, a main character shouldn't be perfect either.