First and foremost, from the players perspective. Dungeons are a sort of combat-in-a-bag; unzip it and get straight into hack-and-slash without all the hassle of intrigue or reason. A dungeon can have a strange monster sitting right below the surface that the party can jump in and overcome in a short time, with expectations for a decent treasure and as little consequence as possible. This last is all important - the denouement following a dungeon raid is expected to be minimalistic.
That is what makes the dungeon 'fun.' In we get, hack a monster, get out, conflict resolved, return to normality.
It may surprise some people that I encourage this sort of thing - but I do! Players need to blow off a little steam, pull a fast reward and sort out some of the tension now and then by compressing a huge and difficult to comprehend world into a tiny zone of a few corridors and caves. A dungeon can be much more than that, obviously, but there is a price the players pay for deeper dungeons - one that I'll pick up later.
As a DM, dungeons are good placeholders. If I'm working out some rule changes or I'm anxious to hold off the campaign for a bit while the season changes, I've had time to update a table or two or I'm otherwise interested in relaxing the encumbrances of running the whole world, a dungeon offers a break. I, too, can enjoy shrinking the world down to a small size and therefore having even less to prepare.
I know that for many of you, dungeon preparation is a big job . . . but I think that is because many of you miss the point. The clue is to be found in the 'dungeon design contests' that permeate the net - it presupposes that better dungeons are those that are fabricated and interwoven on a deep level, such as graphic adventure puzzle video games like Myst (sorry I can't give a later example, but I despise these games and thus I don't set out to memorize their names). The framework of a game like this inevitably becomes a rat maze mixed with a Rube Goldberg machine, in which an overly elaborate, over-engineered set of circumstances are carefully dovetailed into an adventure that endlessly requires the players to pull lever A before pushing in button B after killing monster C moments before entering door D that leads them to platform E and so on. In effect, it is a railroad where everything - not only the adventure but everything - is predetermined right down to which drawer in the cabinet you ought to open first.
This, to me, is the anathema of the dungeon concept. Players, in my experience want to kill in dungeons, not solve puzzles there. Puzzles are the waiting rooms of dungeons. They are far more enjoyed by DMs, who know the answers, then by players - again, in my experience. I have had players who liked puzzles, but even they have admitted that they'd rather solve puzzles in a quiet, personal framework like a jigsaw or a crossword, then having to do so with three or four other players who aren't into it.
The difficulty with the long dungeon - and complicated over-engineered adventures inevitably become long dungeons - is the lack of choice that accumulates over time. In my sandbox world, as the player enters the dungeon, the player adopts those limited choices as a responsibiliity. Having entered, they make a handshake agreement - "We will enter this dungeon and suffer a lack of choice in expection of the combat and treasure we hope to receive."
If, however, the dungeon traps the player, this contract becomes increasingly exploitive, leaving the player to say, "When we entered this dungeon, we had no reason to expect that we would be forced to remain here for eight continuous months of real time adventuring." Complaints about the dungeon will increase session by session - most competent DMs, I feel, will begin to get the hint and find the players a way out of the dungeon before complaints become rebellion.
But why wait until then? Why drag the players through endless empty rooms, meaningless imagery and mindless traps if those things are no more than a buffer between the player and their treasure. What sort of player-game behaviour are you anxious to teach?
I am not clear on why players must go through some kind of made up scourge before they fight the monster and get the treasure. It is understandable for video games - these are played alone, the combat mechanics are necessarily simplistic and without all the timewasting, such games could not be sold for $60. But note that the more successful video games just now are those where you just start playing. The whole value of candy crush or farmville (or whatever is making a billion dollars this year) is right there from the start. You don't have to sit in a waiting room before you earn the right to play the game you came to play - you jump right in!
The 'game' part in an RPG is combat. Role-play offers huge numbers of other features, the interplay of emotions, implementation of status, accumulation, personal growth and investigation, but those parts are not played as a 'game' the way combat is. These other things are mental acquisitions, that are best when they sooner or later lead to conflict. Nothing equals combat in an RPG than when the success of a mental acquisition hinges on the die roll played out through a game conflict.
Sometimes, however, the players just want to hack. For that, fitting in a small side hole is a convenience. Small, so that when they want to return to their mental acquisitions, they can step out, brush themselves off and get back to business.
Dungeons are vacations. When you try to make them more than that, the result changes. Think of it as the difference between spending an interesting week in Paraguay compared with living there all the time.
(Sorry, JB; was the most obvious example)