Further to Christopher's point, Hollywood in general seems more prone to choosing the lethal option. Most of the Trek films, for example, end with the heroes causing the villain's death. Why this should be I don't really know, other than a surmise it's born of similar logic to sex so often being used as a shorthand for intimate relationships. It's an easy way to narrative catharsis, the villain getting what they deserve, the romantic tension resolved. Problem is, at least in my opinion, it's too often not a satisfying approach, because it isn't properly earned. Or, in the case of Superman killing, goes so strongly against the popular perception of the character.
Yes, I've never been a fan of the Hollywood insistence that the villain needs to die at the end of the film. (Although it's not just Hollywood. I'm a fan of Japanese
tokusatsu shows, but one part I'm not a fan of is the usual formula that every monster or villain gets killed by the hero/es.) The problem is that when superhero comics are adapted to movies, the usual practice is to alter them to fit a conventional movie formula, and your typical action movie formulas are generally about personal survival or revenge rather than selfless rescue of others, so you get things like
Batman '89 where the Joker is retconned into the killer of Bruce's parents so that it becomes a personal revenge story, or the 2005
Fantastic Four movie where the climactic battle is purely about the FF trying to save their own lives rather than saving the world (and they even risk destroying the entire world to protect themselves, which is what villains do, not heroes). And of course, the conventional movie formula demands that the hero kill the villain or at least fail or decline to save them from dying some other way.
And I agree with Awesome Possum that everything happens in a story because the teller wants it to. The trick is not making the artifice obvious, and thus not undermining your character, emotional, thematic intent. It needs to feel like a natural development, with build-up and consequences, and that's really hard to do, especially if it's heavy, dark stuff like the "awful choice" trope that seems so prevalent at the moment. You do it wrong, it just feels like you're being grim for the sake of it, a trap that, for me, so many keep falling into, including Zack Snyder.
There was a ton of stuff in
Man of Steel that wasn't earned by the narrative but was just tacked on because it was standard in a Superman story. Like, there was zero reason for Zod to land his doomsday device in Metropolis instead of anywhere else on the Earth's surface, because Clark had never even been to Metropolis at that point and it had no particular significance to him. And then there's the bit where Jenny sees Superman arrive and save Lois Lane after being completely absent during the previous 15-20 minutes of the city collapsing all around her, and Jenny looks at him adoringly and says "He saved us!" -- when the more likely reaction after all that would be "WHERE THE F--- HAVE YOU BEEN THIS WHOLE TIME WHEN WE NEEDED YOU, YOU $%*&%#????!!!"
I got into the comics in the early 90s and he'd occasionally kill, but there was always a weight to it. The biggest probably being Doomsday where he has to kill him because it's the only way to stop him and kills Supes in the process. I also felt that he's willing to kill if given no other option and he's going to do everything he can before it gets to that, but it has happened occasionally. He's not really defined by it in the same way Batman is.
If so, that's a change from the pre-Crisis Superman, who was just as committed to never killing as most superheroes were. Back then, heroes refusing to kill was the rule, not the exception.
I feel like even Batman’s code against killing may be a bit overstated. I don’t read many Batman comics, but one I did read not long ago was the “War of Jokes and Riddles” arc, at the end of which Batman tries to kill the Riddler, and is prevented from doing so only by the intervention of the Joker (of all people). I’m sure it’s hardly typical — it’s treated as a BFD in the story, and the secret guilt of it has weighed heavily on Bruce ever since — but it does suggest he isn’t incapable of it under the right circumstances.
I think modern comics writers often try too hard to make characters "edgy." I remember a controversial story from the late '80s, I think, that ended with Batman locking a villain in an underground cell that nobody else knew about and just walking away, implicitly leaving him to starve to death. I think maybe some other writer later retconned that he changed his mind and came back, but I don't recall for sure.
I remember reading a column on the Law and the Multiverse blog, which explored legal issues in comics and superhero movies/TV, that pointed out that there's a very good reason for superheroes to have a policy against killing. If a member of the police or the military kills someone in carrying out their duties, they have the weight of the state to support the legality of their actions (assuming it was done legally and out of necessity, and unfortunately often when it wasn't). But a private citizen acting as a vigilante has no such protection, so a superhero who killed would leave themselves open to prosecution or wrongful death lawsuits, and would probably lose whatever informal support or benign neglect they were afforded by the police and federal authorities. So even aside from moral considerations, it would simply be extremely unwise for a superhero who wasn't an official state actor to use lethal force if there were any other alternative.