For me, it depends upon the story that is being crafted.
I have a few that take place in situations where people die (war, adventure, colonization)
In these situations, to me, to just have side characters that the reader has no relationship with die, seems cheap. You wont be able to feel the grief of the community because you didn't know this person. You have no reason to care about their death. To create a character who will only die a few chapters later also feels cheap because it is very obvious that they were just "made to die" and it was just an emotion grab, not attempting to truly reach the reader.
Many times, the character's I know are going to die are there for a while. We all deal with death at some point in our lives, grief is a natural part of living to me, so it feels natural and sort of necessary to also put that in my own stories. Many times they are one of the main characters, (So think RON instead of FRED). You have an intimate relationship with this character. Sometimes their death is self inflicted (I do have a suicide in a story I want to write), sometimes its an accident, sometimes its a heroic action. Sometimes its in the middle of the story, sometimes its the climax. Sometimes its even towards the beginning, and the more you learn about the character thru other characters reactions and reminiscences about them can make it seem like you knew them better too.,
But it always has to work for the story. If you just want to show that people die, then yeah throw the rag dolls to the slaughter. But if you are trying to communicate to your readers Grief, loss, the tragedy of War, the senselessness of accidents, healing, ect... you'll need a character to die, and to die in a way that communicates that message.
Then again, if you are doing a horror story (Thou I've always found it a bit more horrific when deaths happened to characters I had attachments with) or you have some nameless soldiers being shot down, or whatever. If the nameless death needs to happen within the narrative, then do it.
So i guess after that ramble, its all about what you are trying to convey in the death (change in dynamics, a theme, a feeling) to determine how you should implement it.
(Ex: I dont actually think GRR Martin just kills people off. I've always thought it mimicked the reality of death in such environments, and the truth that you can never call it. Which i like. Thou I will admit, I didn't feel most of the Harry Potter deaths (In the final battles) because they were all done off screen. While on one side it also mimicked how, in a war, you may find out your compatriots died, the lack of really seeing and feeling it felt a little cheap to me. Especially since its done right at the end, so there is really no time to delve into the aftermath, and its just sort of stated then gone. But that's just me. I personally think killing a bunch of characters off screen (So to say) is not that impacting and really just more annoying)