Where do dungeons come from?
If you are swayed at all by Gygaxian Naturalism this is a serious question. While I enjoy games that have weird stuff in them I find that if things don't make some sort of sense, if there is not some reasonable verisimilitude, I find it hard to suspend my disbelief and invest my imaginative powers in the game.
So where do dungeons come from? Ruins, crypts, and caves seem to account for many of them. Well, why are they full of monsters? What percentage of such things end up being full of monsters? How do they supply themselves and where does their material culture come from? These sorts of questions lead to a Gygaxian Madness of maps full of lots of latrines, bedrooms, and kitchen. How many goblins to a latrine? How much grain do the giant rats need access to? The dungeon master can easily spend enormous amounts of time worrying over this sort of minutia that ends up being quickly forgotten flavor description. Basically not a good use of time worrying over, but if you are a logical sort of person who thinks about these things you will probably spend a lot of time thinking about why exactly some dead become undead, and why certain places are infested with this or that and others aren't. Some of these things are important back-story considerations and others (e.g. how many weeks of rations can you reasonably retrieve from the goblin storage-warehouse, and where did all of these barrels come from?) are just distractions.
How come all of these monsters have managed to exist, survive, and even thrive alongside humans? Humans may have become agrarian because they wiped out all of the mega-fauna they hunted in the paleolithic, so how come we have a world full of crazy beasties alongside professional monster-slaughterers? It is either a crazy game of evolutionary arms-race, or they must be coming from somewhere.
Ancient Alien Power Sources:
In the before time, otherworldly beings visited, lived, fought wars, and died on the planet. The ruins of their technology can be found here and there, particularly if you delve underground where the ruins are protected from the elements. In these places one can find crashed starships, factories, and even cities built out of strange materials and exhibiting wondrous qualities. Most dangerously though one can also find the long-decayed power sources of their civilization.
These power sources, large and small, have lasted across the eons but have decayed and become uncontrolled. Their strange emanations twist the matter and energy of the universe itself. In their vicinity strange creatures roam and the earth itself can become deformed. Sometimes alien sites no longer hold any trace of their true nature other than the power of source. These places hold wondrous unearthly riches and terrible dangers. The power sources themselves, (which have through the ages mutated and changed into many forms) are a miracle and a disaster, bringing both power and corruption to those sorcerers and heroes who attempt to harness their powers.