I think this really depends on the game, I don't think it makes sense to have a blanket policy for all RPGs. For example, I'm not personally familiar with the OSR style of play, but I gather that the risk of death for "bad decisions" is one of the elements that makes that game engaging for people who prefer that style.
And while this is slightly different than straight up dying in a fight, I'll relate a brief anecdote from a session of Mouse Guard that I GMed. There were two players, and their mission for the session was to rescue the governor of Sprucetuck from the dangerous experiment he was conducting (I had made him sort of a wild-eyed mad scientist type of NPC). One of the bad rolls they made in the process of escorting the governor back to the safety of the town called for a twist, which I had prepped as an owl attack. Owls are obviously very dangerous foes for mice, and the owl was out hunting so its goal for the fight was to eat mice, but the players fought valiantly and managed to win, although with the obligation to compromise a significant concession. It seemed to me that the most reasonable compromise relative to the owl's original goal was that it would be driven off but would eat one mouse. When I offered that compromise I fully expected the governor to be the one who was eaten, but one of the players said that their guardmouse would actually be willing to push the governor out of the way, thus sacrificing themselves, in order to save the governor and complete the mission. This was awesome, dramatic, and really drove home aspects of the character in a way that I'm not sure anything else could have. While a twist in Mouse Guard is a bit more significant than a wandering monster roll in D&D, this character death wasn't part of any planned story but nevertheless made for a really cool part of that character's story. If I had fudged rolls or offered a weaker compromise than the owl deserved from the results of the fight then we never would have experienced that cool roleplaying moment.
That is what I mean when I say that script deaths are one of the exceptions. In your case, the player willingly chose the death. That is good story telling. Dying because GM miscalculated the challenge rating, on the other hand, is not.
I am not opposed to death, I am opposed to meaningless death.