When people new to the original D&D rules (the 3 LBBs) first look at the monster lists, they're a little stunned by the number appearing column in Monsters & Treasure. How would you even run an encounter with 300 bandits? After a while, someone will tell them that these are the "wilderness encounter" numbers, and the treasure table in M&T is wilderness treasure; for dungeons, you use the much smaller numbers suggested in the wandering monster tables in Underworld & Wilderness Adventures, and the treasure tables in that book as well.
This works, but isn't quite true.
The problem is that we're thinking in terms of individual encounters, which is what the wandering monster tables are designed for. Similarly, the treasure tables in U&WA are individual treasure caches, used when randomly stocking each room. But U&WA tells us: "It is a good idea to thoughtfully place several of the most important treasures, with or without monsterous guardians, and then switch to a random determination for the balance of the level." You're not supposed to use random stocking of monsters and treasure for every room.
What the so-called "wilderness encounter" tables are for are entire lairs. Those 30 to 300 bandits? They're in a location dominated by bandits. This may be an outdoor camp, a fortress, or a dungeon level. After rolling for the total number of bandits and leader types, you divide them up into individual encounters, then sprinkle in some other monsters for variety.
Here's an illustration: we start with a concept that we're going to have a couple dungeon levels overrun by goblins who have disturbed a crypt on a deeper level. Let's give the goblins a handful of slaves (maybe a couple kobolds and 1 each of about 6 other creature types) and some kind of pet, maybe giant rideable rats (1+1 HD.) The undead cohort will be skeletons led by ghouls.
There will be 40 to 400 goblins total in the two-level dungeon, plus the goblin king and 5-30 guards (treat as hobgoblins.) Figure there must be about half as many giant rats. Kobold slaves should be much less than goblin numbers: let's use 4d6 for them. Pick six other intelligent monster types to keep as slaves: maybe a caveman, a dervish, an orc, an elf, a crippled ogre, and a wingless pixie. Rescuing some of these may lead to adventures in other areas.
Place the goblin king and some of the guards in one chamber or a suite of chambers, with any features you feel fit the concept. Place some of the other guards in special barracks or at access points leading into the king's chambers. Place the slaves at various labor locations or slaves' quarters. Place some rat stables/kennels, and maybe a rat jousting area or a couple other special locations.
On the lower level, mark your main ghoul lair and a couple special rooms with skeletons and/or ghouls. Ghouls get Treasure Type B, but figure at least part of this treasure, maybe the magic items, has been stolen by the goblins and will be in the goblin king's lair.
Place a couple tricks or unusual dungeon features. You might want to place these mainly in the tomb level.
Make your wandering monster tables, using Goblin, Rat, Kobold, Skeleton as your main entries for Level 1, adding Ghoul to Level 2. Weight the Level 1 chart in favor of the living creatures, the Level 2 chart in favor of undead. Add a few other, lesser monsters, like green slime or normal-sized rats or snakes, to fill out the rest of each chart.
Now, stock the remaining currently-empty rooms on your map, using the method in U&WA. Use the wandering monster chart to decide what monster, if any, is in each room. Just remember not to go over the maximum number of goblins, rats, etc. If you "run out" of goblins or ghouls before you finish stocking rooms, replace them with the lesser "vermin" monsters. Finish up with a few simple traps in various locations.
You can expand this to a full mega-dungeon, picking a new "main" monster type and one or two supporting monsters for each adjacent region or lower level. For example, Level 3 might be an ogre level, the home of the crippled ogre mentioned above, while a distant region on Level 1 may be a kobold lair. Areas around stairs or other access points to other levels will have a monster or two from the other level.