By now, there are enough heroic sacrifices in big blockbuster movies to make you roll your eyes every time one is clumsily set-up to give the leading hero increased stakes for the big climax. It's one of those cliched devices that earns a big impact even despite how over-used or even how obvious it is - a high yield/low effort device that is its own justification.
Inevitably, when a story deals more overtly with the idea of heroism, the chances of seeing someone throw themselves on a narrative mine increase exponentially. It's almost like Hollywood thinks the easiest route to a hero realising their own importance (which is one of those story-telling pillars you never won't see) is to give them a martyr to boost their journey.
That's why comic book movies seem to have an anomalously high number even for blockbusters. They're made for this sort of emotional punch - populated by heroes on puberty-like journeys out of their heroic shells who need an easy prod along the way.
It doesn't always last, of course. Tony Stark sacrificed himself in The Avengers without sacrificing himself, but at least some of the others who died so others could live had the decency to actually die in the first place. Even if they did revert back to their comic book origins by swiftly getting better.
You'd be surprised how many times they do it too...