And again it would make no sense for a company to put time and money in developing classes that wouldn't be touched by anyone because they are so weak, that you cant do a playthrough.
I've played some games that do include such things. They're nominally for "Challenge Runs" where the class is intentionally designed to be actively detrimental in every way, so you have to exploit the game's systems to the fullest.
Of course, sometimes they like to do some tricksy balancing with such classes. Like, they're super awful and almost impossible to play... But then you reach a certain point and they unlock a special power up that makes them the most broken OP class in the game.
Outside of that, games have different balancing.
Actually hard games, like Owlcat titles, Wasteland 3, Underrail etc. On the hardest settings can be difficult. They require min-maxing in order to be successful at those difficulties. Playing a less optimal class/build will get you stuck unable to progress.
Which is generally the point of "Hard" difficulties, they're supposed to be... Well, hard. Something that doesn't exist in BG3 where even Honor Mode is an absolute cake walk with unoptimised meme builds.
It's one of the tricky parts of balancing. Sometimes a class can find itself being less viable on higher difficulties (For example, Mass Effect 2 has Biotic and Vanguard get significantly worse on Legendary difficulty. Biotic has all its powers besides Warp become useless as they don't work on enemies that have Armour/Shield/Barrier which EVERY enemy has on Legendary difficulty. Vanguard's main schtick is charging into close range and blasting with a shotgun, but on Legendary difficulty every enemy has too much health and damage to make that not end with you dying in 0.01 seconds)
Meaning it's not that a class is designed to be bad, it's just that some aspect of their design doesn't mesh well with higher difficulties (Usually classes with low health or a reliance on CC tools that make them too squishy and rendered ineffective against buffed up enemies respectively)