When you write fantasy, killing someone off isn't necessarily the end. Depending on circumstances, you have options like undeath, lingering as a ghost, resurrection, growing a new body to put the soul in, and, with a long enough time frame, reincarnation. Not that you want to keep all your characters alive. But death isn't quite as final an end as it would be in more real-world-oriented genres.
Rewatching Teen Wolf--being a sucker for teenage-oriented shows is an occupational hazard of being a high school teacher--I noticed the degree to which both heroes and villains seem to come back from apparent death. Here's illustrative dialog:
Peter: Doesn't anyone ever die in this town?
Malia: I think people were hoping you would.
In any case, some stories necessarily involve death. But both authors and audiences aren't going to want to lose a beloved character. Then again, if a development like that weren't moving, we'd know something was wrong with the story.