The confusion here is there are a few different ways of playing D&D and many different types of DMs out there. The number one rule that matters, imo, is that everyone is having fun and enjoying the game at your table.
Some players don’t want their characters to die, at least non-meaningfully, in a campaign that’s meant to be long-running. D&D is as much about the story as it is about having fun and setting expectations with your players.
If you market the campaign as mostly storytelling and light combat, but then the party rolls up geared for the former but not the later - then people will likely leave feeling frustrated instead of feeling like they had fun when they die to a random encounter. If you don’t set expectations well or prepare people well, then some people will quit playing right there instead of creating a new character.
If I want a high-stakes, combat-geared campaign where people will be expected to create new characters at some point then I feel it’s important to lay that out from session zero.
If I want some middle of road campaign geared towards storytelling and medium combat, even then I’d be letting players know from the start that their characters can die from any encounter if they push their luck too much.