Let's go back to basic and AD&D. And 4 classes.
You had the Magic User, the Cleric, the Fighting Man and the Thief.
The Magic User could cast spells, but had a limited supply of magic and was fragile. As they gained levels, they gained the ability to cast more spells per adventure, and the impact of their most powerful spells (if they worked) was greater on the world. At the same time, spells fully working on monsters became less and less likely.
The Fighting Man gained in durability more than any other class. They had a weapon and armor, and could survive blasts from a dragon or an enemy wizard better than anyone else. Their offence grew as well, but frankly slower than their durability did. In addition, they had the wildest selection of magical weapons and other equipment they could use.
The Thief was a marginal combatant; better than the wizard, way worse than the Fighting Man. But the thief could move around the dungeon environment better than the Fighting man could.
The Cleric was also a worst combatant than the Fighting Man. They had access to a limited set of magical weapons. Their spellcasting was weaker than the Wizard, and less of it involved blowing enemies up, and more of it involved healing and boosting their allies.
They also had impressive anti-undead capabilities; the first Cleric was a class specifically designed to kill Sir Fang, a PC-vampire, by the DM at the time.
---
We then go forward. The 3e Rogue is a better combatant than the old-school Thief (its sneak attack is less situational).
BEMCI, AD&D and AD&D 2nd made the Fighter's offence scale more than it used to.
The Paladin and Ranger subclasses of Fighting Man where introduced.
The Bard is a spellcasting Thief variant in role.
Other than that, the rest is basically similar in the intended role.
The Wizard is supposed to be fragile and guarded by the front line, and blast stuff when things get hard, and otherwise conserve their power. The Cleric is supposed to be guarding the flank of the Fighters, and using support magic. The Rogue/Bard is supposed to try to avoid the thick of combat, and be a support expert in their field. The Fighter are supposed to defend their party by physically being between them and the hostile foe, and fight toe-to-toe with the enemy.
Rangers are sort of a Thief/Fighter hybrid in role. Paladins a bit of a Cleric/Fighter hybrid role. Bards a Thief/Wizard hybrid. Druids are variant Clerics in their role. Monks where maybe Fighter/Thief in role.
Ie, they are supposed to play like AD&D 2e characters do, with new mechanics.
...
Things that went wrong.
The spell count of high level spellcasters gets insane. Spell save DCs scale faster than saving throws do; in the old saving throw system, the chance of a spell landing on a level-appropriate foe went down at higher levels, while in 3e it went up in practice.
And attempts to make the cleric feel less of a 2nd line combatant ... resulted in them eclipsing the fighter at fighting. The same happened with the Druid, who has a class feature that is as good as the entire fighter class (animal companion).