That's novice stuff. It's a cheap emotional gut-punch that weakens that character's ties to the world and story. You can do so much more if you keep them alive:
They can hand out quests, as they think their child could handle it.
They can help out with certain tasks, like watching a tavern or storing stolen goods.
They can be a good twist villain later in the game, because they're tied to the heroes.
They can be a good fake-out villain, because it's suspicious you haven't killed them yet.
You know when your parents ask you to fix the printer because you're the IT person in the house? That, but it's goblins. You're the goblin-fighter person in the house. And you're getting paid in a dessert your mum was making anyway.
Oh, yeah, that's totally a good thing to do with living parents too. Someone has to inform them what happened to their child, after all.
After one of my PCs died, my planned backup was going to be of the same class and race, but a few years younger and motivated by a desire to travel with her brother. The brother who had just died, and she didn't know. I am so sad schedule issues got in the way of that...
We had a campaign start at level 1 with the undead led by a lich killing the ranger’s parents. At lvl 18 the wizard raised them with wish for resurrection.