The classic D&D setup is a town or city with a dungeon nearby. Assume for a moment that the dungeon’s proximity to the town is not coincidence. From the point of view of the townsfolk, situating their town in this way does not seem like a wise move. People generally build settlements near resources (mines, farmland) or transportation routes (rivers, passes, roads).
In a traditional game, the dungeon resource is treasure, but treasure is almost by definition, a luxury. It is not something that yields any return outside of exchange society. Treasure is, after all, inherently almost valueless. The value of money (gold included) is a social construct. There are many other useful things that might come out of a dungeon though. Here are a few of them. If the setting is truly dangerous, such as a post-apocalyptic wasteland, or demon-infested wilderness, controlling a dungeon entrance might even be the only way any kind of civilization might be able to survive (for an extreme example, consider ancient domed cities on mars which require archaic fuel cells to power the life support systems).
- Ancient fuel cells (required to power technology or weapons)
- Rare magic components
- Wandering souls on their way to the underworld (mechanic for resurrection?)
- Gastronomic delicacy or rare spice
- Sole source of potable water (surface water is polluted, poison, or intoxicating)
- Slaves (goblins taken from the underworld make up an underclass like helots)
There is a danger of starting out too weird, and scaring off or confusing your players. If you follow such threads to their logical conclusions, you may end up with a society based on dungeon ecology which is totally unrecognizable. You probably don’t want to begin your campaign with a 10 page setting document for your players to read. As James Raggi suggests though, there is no need to go overboard with explanation and backstory. Even to yourself, as who knows where your ideas (and the dice) might take you in the future? Also, there is no reason why the level one PCs should know how things actually work. Let the characters discover things slowly, starting from a relatively mundane and recognizable medieval setting (with, in the tradition of good speculative fiction, one or two aspects varied).
Alternatively: dungeons are so dangerous that once discovered they must be sealed and guarded, lest their denizens overwhelm the surroundings (remember the turnstiles and holy water hoses of Blackmoor in The First Fantasy Campaign). Perhaps dungeon entrances are gates to hell, the no-man’s land in the never ending war between cosmic factions. This is not incompatible with the conception of the dungeon as mythic underworld. Rewards will be given by the authorities to those brave enough to enter and help subdue the demons. Entrance to the dungeon without permit is harshly punished, and secret entrances are highly prized by adventurers (though they also risk allowing the dungeon’s evil to leak out). The penalty for entering a dungeon without permit is death.
This evil could also be considered a bounty, by those imprudent and power-hungry. A dark magician, or evil high priest may try to ally with the denizens of the dungeon in order to harness the power of the underworld to subdue neighbouring lands.