It seems to me that there are three basic philosophical approaches to dungeoneering and the underworld in D&D. (They are specific to D&D and its mythos, such as it is.) They are:
- The Philotomical Approach, better encapsulated in the phrase "dungeon as mythic underworld". Here, the dungeon is a kind of antithetical reality to the surface world, ruled by demons or other powerful and supernatural entities, akin in a way to hell or Hades. Far from being just a set of tunnels underground, it is rather a kind of grotesque mirror to our own reality - the yin to our yang, the place from which true evil comes. This is the most supernatural or fantastical perspective.
- The Salvatorean Approach, which is (probably) the one which Gary Gygax took, best encapsulated in one single phrase: the Underdark. Here, the dungeon is a vast underworld, just like in the Philotomical Approach, and not just a set of tunnels underground, but here, it is still natural (in the sense of being naturalistic). It is knowable and works along comprehensible lines: there may be mind flayers, kuo-toa and drow down there, but at least those things are understandable as actual real physical entities. It isn't a well of infinite evil; rather, just a very bad place for surface dwellers while still being a living and breathing world in its own right.
- The Piecemeal Approach, in which there is no underworld as such - only separate dungeons. Over here is an ancient volcano riddled with caves and tunnels; over there is an abandoned castle; yonder is a ruined temple: all of them are dungeons, but none of them are anything more than that. They have bottoms. They are finite. This is probably the most 'realistic' approach.
I have always tended towards the former in my gaming, although it usually appears as if it is the latter. Just by entering the first few levels of this or that dungeon, the players would be unaware of the supernatural nature of the underworld; they would not even suspect that an underworld exists. But it does - if they delve down far enough they will usually discover that there are more things in heaven and earth than are dreamt of in their philosophies. It just lurks very, very deep, although its tendrils stretch up and up if you know where to look for them.
What this means is that I can, on the one hand, indulge in my banalifying instincts by talking about how trade can go on between dungeon denizens and surface dwellers, while on the other hand imagining that beneath it all there are devils, demons, and an entire mythical underworld representing hell itself.