TV producers came up with Doctor Who's TARDIS and Captain Kirk's Enterprise as means of getting a continuing cast of characters into a wide variety of different situations. The original-model D&D dungeon serves an analogous purpose, offering a potentially endless supply of "mystification, enjoyment, excitement, and amusement in the challenge of the myriad passages of the dungeons."
This points up the difference between two very distinct approaches to dungeon-building.
There's the approach which might be termed the "dungeon campaign," which is the basis for mega-dungeon settings like Undermountain. In this approach, there is one singular Dungeon (though perhaps subdivided), and the campaign consists of a series of expeditions into the Dungeon in search of gold, glory, and peril. This is the "old-school" style of the original D&D campaigns.
Then there's the "dungeon site" approach, in which there are multiple small dungeons scattered about, and the PCs travel between them, cleaning them out in turn.
In the "dungeon campaign," the dungeon serves the purpose Ariosto describes above; like the TARDIS and the Enterprise, it's an excuse to bring the PCs to all manner of exotic locales and exciting challenges. In the "dungeon site," it's a bit different--each dungeon is a single exotic locale, and some other excuse is used to get the PCs to it (e.g., a quest to save the world which involves collecting plot coupons, each coupon to be found at the bottom of a handy dungeon). Instead of the TARDIS or the Enterprise, the dungeon is now the planet being visited.
In general, I find the "dungeon site" approach is easier, because you don't have to work as hard to keep each new dungeon fresh. It's a real challenge to concoct a single mega-dungeon setting that can incorporate all the variety you need for a long campaign. On the other hand, the "dungeon campaign" offers the advantage that it develops a single locale to a great degree. This lets the players really learn the layout and put that knowledge to use, which builds up their investment in the game world. On a more pragmatic level, it means the DM can get a lot more use out of each map.
