Just because a character is technically a villain doesn't mean everything they do is terrible.
There are plenty of anime villains who were right, even though their actions were arguably evil. Some - like Sasuke Uchiha of Naruto and Scar from Fullmetal Alchemist: Brotherhood - were victims of state-sanctioned horrors seeking justified revenge. Shougo Makishima of Psycho-Pass, meanwhile, tried to take down a corrupt government to potentially save thousands of lives, but inadvertently got his hands dirty in the pursuit of justice.
Anime villains who are pure evil can be fun, but when an antagonist has relatable motivations, the story is always more nuanced.
Scar is a survivor of genocide. His people, the Ishvalans, were exterminated en masse by the Amestrian army. His family was slain, and he was severely harmed. His villainous behavior began when he took out the Rockbells, two doctors who had been treating him. The act was thoughtless, one borne of panic. From there, Scar went on to take the lives of Amestrian soldiers who he believed deserved it because of their complicity in the conflict.
Rather than letting revenge consume his life, Scar ultimately comes to regret his actions, as he realizes hate begets hate and holding onto a grudge serves no purpose. While slaying the Rockbells was clearly unjustified, it’s hard to fault him for going after soldiers, since some of his victims were directly involved in the Ishvalan extermination.
Lelouch is a nuanced character, so it's difficult to classify him as a hero or a villain. He commits some atrocious acts in the name of his goal, which include slaying his half-sister, betraying his friends, and lying to his followers. However, Lelouch's vision is laudable; he wants to free Japan from the iron grip of Brittainian control.
Regardless of his methods, he is right to try and dismantle colonial rule.
Despite being a vicious monster, Stain is a villain with conviction. He despises professional superheroes, as he thinks they're hypocritical liars who care more about making money than actually saving people. Stain wants to deconstruct a society that values money above people's lives, so he starts slaying the pro heroes who symbolize the broken system. He's reluctant to hurt anyone who isn't a professional hero, and will only do so if he's physically threatened.
While his methods are questionable, Stain makes a good point; My Hero Academia's hero system is deeply flawed. The society's laws are convoluted, heroes don't always protect people who need help, and the whole enterprise is ruled by capitalism.
Taking the lives of the people who work for the hero system may not be the right away to get his message across, but Stain's actions do not invalidate his observations.
In a world where people are murdered on sight because a computer program said they might break the law at a later date, it's hard to see conflicts in black and white. While authoritative figures are typically the good guys, the exact opposite proves true when a society's government becomes corrupt.
Shougo Makishima wants to put an end to the wicked Sibyl System, but he tries to accomplish this by ruthlessly slaying anyone who gets in his way, including people are who are totally innocent. He's even willing to wipe out his nation's grain supply - effectively starving everyone in the country - to accomplish his goal.
While it's difficult to ignore Makishima's misdeeds, something definitely needs to change in his society, and it's impossible to imagine him dethroning the Sibyl System via nonviolent means.