Clerics, the devout servants of gods, are undead controllers, protectors (not healers), and back-up fighters. Turn Undead is a very useful tool in most megadungeons. Undead are "eternal" (they do not need to eat, sleep, interact or generally be alive) monsters. As this is the case, they are found within most megadungeons, and a large amount have entire floors dedicated to undead. Clerics make these fights more manageable to the group.
As protectors (not healers) the cleric's secondary role is to use their spells to keep people alive. Looking at the spell list: Cure Light Wounds, Detect Evil, Detect Magic, Protection from Evil, and Purify Food and Water, Remove Fear, and Resist Cold are all spells designed to protect the group. Even the 1 spell (Light) I didn't mention in the OSE list could be considered to protect the group. Most OSR lists will draw the same conclusion. Healing is an afterthought to protection for early edition clerics.
Finally, clerics are the secondary fighters to the, well, fighters. Clerics can use any armor so they are ideal front line defenders. Their to-hit-bonus progresses slower than the demi-humans and the fighters though.
Dwarves, the stout bearded friends are great scouts within the megadungeon. They have several 1 in 3 abilities to help explore: Detect Construction Tricks, Detect Room Traps, and Listen at Doors. Besides these abilities, they can see in the darkness.
Dwarves can wear any armor, and use most weapons. As such they are almost on par with actual fighters. They have a good to-hit progression also. Largely, a dwarf can substitute for a thief or fighter in a pinch, but have the ability to gain information that other classes cannot.
Elves are a fun class that can fill many roles as they get access to all weapons, armor, and most arcane spells. As such, they make fine front line fighters. They also have a solid to-hit progression.
They have three abilities that help them scout: Detect Secret Doors (1 in 3), Infravision, Listen at Doors (1 in 3). The arcane spell list allows them several additional information gathering abilities: Charm Person, Detect Magic, Read Languages, and Read Magic all help with puzzle solving and exploration.
Fighters are the most straightforward class. They have no special mechanics, instead use weapons, armor, and wit to outbattle foes. They can however participate in riddle and puzzle solving, map making and other fun activities.
Halflings are also great scouts and explorers. They have a hide ability (1 in 3), initiative bonus (+1) and the ability to listen at doors (1 in 3). They can also use all weapons (size restrictive) and armors, making them good fighters as well.
Although fun to play, a halfling's role in a megadungeon is often overshadowed by the other classes. Without infravision, they are weaker at scouting than the dwarves and elves. Their size limits their damage output in combat.
Magic-Users are the Swiss army knife of the group. Using their spells to overcome obstacles is where the magic-user shines. They are not good at combat (relative to the other classes), but can make quick work of other problems. Magic-Users are problem solvers.
Thieves solve the other problems that magic-users cannot. Their skill list: climbing, find/remove traps, hear noise, hide, move silently, and open locks all help within the halls of a dungeon. Only pick pockets is not useful in nearly every delve. When they hit higher levels, read languages takes some pressure off the magic-user's spell list too.
In combat, the backstab ability can end a fight in moments. In my humble opinion, the thief is the most necessary class in an old school megadungeon.
Ranking the Classes