I've had quite a few characters that have died. Of the three completed RPs I've been apart of, two of my main characters have died. Along with that, many side characters also met the same fate along the way. There are many reasons to kill a character: to advance a plot, to increase the emotional stakes and severity of a situation, or simply because that seems like the best (or only) outcome for that character. I don't kill characters off because it's an available idea, but more to serve a purpose. After all, you get attached to a character if you end up playing them for months, or in some cases years. Sometimes, it's hard to let go, but ultimately I do it because the pay-off is a better-told story.
I do notice that the idea doesn't sit well with a lot of people though, especially if they played those characters for a long time. That's why I usually leave the fate of the characters up to the RPer, rather than take it into my own hands as a GM.