We are asked by a story to place ourselves in the position of the protagonist- which is why reading Lolita is uncomfortable or worse.
The killing Joke is the jokers story. Batman is just in it. Infinity war is Thanos story. The Avengers are just in it.
So the decisions Thanos makes are important - especially in a under nuanced blockbuster as opposed to say Lolita as above.
There's a school of thought that says that portraying moral complexity is a more mature, realistic approach to storytelling than simplistic black-and-white narratives where the villains are pure evil and the heroes are pure good. Part of the reason for doing that is so that we, the audience, realize that although we might think of ourselves as good, we are capable of doing bad things. We learn that moral purity and moral certainty is a form of self-deception. Think about the moral certainty of war, for example.
It's like real life to be honest. Real life police officers don't go pre emptively looking for crime to stop, and the crises they stop come about because the criminal is trying to get something.
https://tvtropes.org/pmwiki/pmwiki.php/Main/VillainsActHeroe...
Many people grow and change by merely being immersed in culture and behaviors that are different from their current selves, rather than holding everything at arm's length and saying "what is this, how does it affect me." This is especially relevant for young people, who have little control over their environment and who and what they interact with.
Think back to your early years at school. How much of what you thought of the nature of the world around you was because of your particular school environment? How the teachers interacted with students? The emotional messaging in the posters on the wall?
Most of us have no idea how much of that stuff formed who we are and what we think as adults, because growing up is a long and complicated process, and no one is fully aware of how they're changing day-to-day as 12 year olds. Many of us don't know how we're changing as adults.