|[Each named character who died in Harry Potter and the Deathly Hallows has their death marked]|
I. IT KEEPS YOU ON YOUR TOES
If an author is prone to killing off an excessive number of characters (e.g. GEORGE R.R. MARTIN) then at least there's an unpredictability to who dies, regardless of whether they're a major or minor character. Whilst with series like Harry Potter you know Harry, Ron or Hermione won't die, with ASoIaF anyone could die with a flick of the page. George R.R. Martin mentioned in an interview that he wants the "suspense to be real"…
"I want my readers, and I want viewers, to be afraid when my characters are in danger. I want them to be afraid to turn the next page because the next character may not survive it."
II. IT'S NECESSARY
Often characters are killed off to make points. E.g. In Harry Potter, each death symbolises something different. Killing off a character (for the majority of authors) is not gratuitous, it's to make a statement about something or other.
III. IT SWITCHES EVERYTHING UP
Sometimes killing off a character can change EVERYTHING. Perhaps another character completely reevaluates what they're doing or reevaluates who they trust… everything can depend on the death of one individual.
E.g. If you've read Daughter of Smoke and Bone: Remember the ending? "They're dead, Karou. It's too late. They're all dead." That certainly changed things around… exciting right?
IV. IT'S REALISTIC
Okay this is the part where I begin to sound like a psychopath. BUT, hear me out. I mean, in an epic, action-filled series, killing off characters IS realistic and HAS to happen. Yes it's heartbreaking when a ton of characters on the 'good' side die, but one side can't win a battle without making huge sacrifices: not all the 'good' people can live on… it's unrealistic. And, to quote Moriarty (although, in the least heartless way possible, because I promise you I'm not evil):