Characters like Bandon in The Shannara Chronicles and Jonathan in Shadowhunters come from a traumatic past. Their near ones tortured them brutally, didn’t trust them and who they leaned on shattered them. At a time when they had to be loved unconditionally and guided, they were thrown on thorns.
These actually have a dark past which led them to the present circumstances. Sure, they made the choice themselves to become who they are later, but the root cause lies with the people they are surrounded by neglecting them.
These personalities start to earn our loyalty, strange as it might seem. They make us constantly wish for them to become good. Anticipating when they will do an unexpected good act or become good for someone they love is our pleasure in watching them.
We are heartbroken too when they die or suffer badly in the end despite the atrocities, they have committed. All of us have a grey shaded life where we have been treated rudely or humiliated by someone. We have taken sometimes horrible actions too. That makes it understandable why we empathize with these broken villains.