Some characters live. Some characters die. It is up to the author to choose which. Or is it?
If a book is done right, it is up to the story itself whether a character should live or not. Readers may disagree, but there are some characters who just needed to die. There are others who shouldn’t have.
One of the Writing Excuses podcasts discusses killing off characters and how to keep from foreshadowing it.
Mentors and parents. Mentors often have to die (E #1), as do parents (FP #1), although it is quite a feat to leave them alive sometimes (epic fantasy list). These die because they would otherwise solve all the problems. Mentors and parents are more capable than a young hero. The only way to make the hero grow up and be the one to save the world is usually by killing off the parents and mentors [or by locking them up (these books) or giving them a wasting disease (these)].
Main characters and the MC’s little siblings. I don’t always care if you kill off the MC’s love interest (Cape #1), but you’d better not kill the younger sister (HG #3)! And you’d definitely better not kill off the MC himself (LBK #12), especially if he’s young and heroic (SW: SbS and BB #1).
So, we come to my book and the dilemma I had with my younger brother (also a writer). I killed off a character, and he argued that this character had not done enough for the story to merit dying. This character’s death didn’t mean enough. At the same time, he said I needed to kill off someone more main, who had done more heroic moments for the story.
This is very different from the way I look at character deaths. I don’t like it when characters die. I don’t make characters into heroes just so I can shock the reader by killing them off! I do it when I can’t avoid it, when the bad guys get too clever, and when I want to raise the stakes for our MC.