Someone is going to die no matter how successful a TV show is. TV dramas are darker, edgier, thus it is demanded of writers to become murderers.
Sure you invest time, get to know the character and root for him/her but liking the character is not enough to assure a spot for him/her in the story. Of course, there’s always an incredible amount of regret involved anytime a writer kills someone off, nevertheless once the show has stepped up and a character has reached his useful end, out he’ll go. These are fictional characters and that’s how you have to treat them.
Death is dramatic, and when writers want to impress you with their ruthlessness, a dance with the reaper is called for. The writer’s willingness to kill off an important character is established earlier on (depending also on the actor’s contract). Death is a compelling part of the narrative – multiple deaths, unnecessary and devoid of heroic sacrifice, are strategically placed at different instances in the story. The closer you approach the climax of an arc, the final episode of a season, or the final installment of a series, even increases the chances of the main characters demise. These are general laws of storytelling.
You can see The Walking Dead has quite a few characters dying (then zombiefied then death again). Even Downtown Abbey has two of its favourite characters dying off. Ben Harmon in American Horror Story, Harper’s Island had all the unnecessary deaths and yes the red wedding scene in Game of Thrones – but we did know that after the beheading of Ned Stark no one was safe.
This is a very clever way to keep the genre going and the unpredictability of what’s happening, leaving fans wanting more because it forces them to wonder who is next or who will be left standing.