He was earths greatest hero. He died trying to save earth from the same fate that happened to his own planet
The avengers ensured earth’s destruction.
I don’t think Naruto takes place on “Earth” but Madara Uchiha is the best anti-villain in all of media; at the very least from his philosophical point of view:
“Wake up to reality! Nothing ever goes as planned in this world. The longer you live, the more you realize that in this reality, only pain, suffering, and futility exist. In this world, wherever there is light - there are also shadows. When a man learns to love, he must bear the risk of hatred. As long as the concept of winners exists, there must also be losers. The selfish desire of wanting to maintain peace causes wars, and hatred is born to protect love. Human beings are nothing but a medium of the general process of carrying out life. They do want to live in peace, but want to win it over by war because ultimately victory is what brings them peace.”
This is his motivation for enacting his plan of using the moon to hypnotize everyone in the world into each person’s eternal perfect dream; eliminating all interpersonal conflict
edit I haven’t watched any Marvel movies but read the actual “philosophy” and logic behind Thanos’s actions and he’s barely more coherent than the Joker, sorry to say… his logic is roughly “I need to murder half the universe so we don’t run out of food”; that’s worse than what a basic AI system would determine and, frankly, is reflective of pretty poor writing in my opinion (relative to how critically acclaimed his villainhood is).