In order to understand a character, a reader should know why that character is the way he is, and this is where the backstory comes in. Even in real life, there is no black and white, and few people are irredeemable. Even the evilest individual has something in his life that can make him seem more real and more human, if not more sympathetic (an explanation is NOT an excuse), and no hero doesn’t have a skeleton or two in the closet, even Steve Rogers (I can’t think of any, but I’m sure he does).
Life experiences make us who we are, and the same is true for your character. That doesn’t mean he can’t be despicable. You want your reader to be glad your character gets what he deserves, whether it’s happily ever after or shot and beaten to death by rebels and getting sodomized with a bayonet while pleading for his life (not my concept–look it up). Or just sent to prison if you work for Disney. But if they don’t know why that character grew to be the person he is, they won’t be as invested in the outcome.
For everything you have your character do, or for everything he is, ask yourself why. Examples: Why did Bellamy sneak onto the drop ship (The 100, TV show – https://www.imdb.com/title/tt2661044/?ref_=fn_al_tt_1)? Why would Stefan reject his Nazi lifestyle because of a woman (Lightning, Dean Koontz – https://en.wikipedia.org/wiki/Lightning_(novel))? Why was Carrie White’s mother such a religious fanatic (Carrie, Stephen King – https://en.wikipedia.org/wiki/Carrie_(novel) and https://www.imdb.com/title/tt0074285/?ref_=fn_al_tt_1)? And so on.