Nothing sells impact in movies like death. That's precisely why the Internet obsesses over who will be the next big death in their favourite franchises: it's not that we want to see anyone killed off, per se, it's just that the exchange is so impactful.
Some film-makers love nothing more than a rug-pull death and it's hardly surprising given how memorable it is seeing Samuel L Jackson chomped on by a shark or Julianne Moore killed off early in Children Of Men or Matt Damon getting his comeuppance at the end of The Departed. They're devastatingly shocking because they come out of nowhere.
But not every shocking death is equal in emotional terms. Sure, seeing a high-profile actor killed off is refreshing because of their profile, but if it comes early, you're unlikely to be invested in their characters, and other times - as with Damon in The Departed - they just plain deserve it. More interesting - and far more devastating - are the unexpected deaths of characters who really matter.
They land with a dull, brutal gut punch, knocking the wind out of you with bonus points for those films that do this just after giving us a reason to love the character in the crosshairs. Because there's nothing says "f*ck your broken heart" like having a character pour their heart out, or save the day, or become important to another main character in a new way and then ripping the life out of them...