It’s occurred to me that not all dungeons (let alone all adventures) have the same end goal, but those goals often aren’t explicitly stated. I’m thinking of writing a blog post about thus, but at the moment I’m still gathering my thoughts.
What I mean by ‘goal’ is the end state or win condition of the dungeon. There’s a few default answers.
For a typical dungeon in a modern 5e module (I’m painting with a bit of a broad brush, but I think it holds true) the default goal is to clear the dungeon .Explore each room, beat the boss, take relevant loot or quest items. This is one reason that secret areas don’t feature as strongly in these dungeons.
For typical OSR dungeons, which often feature gold-for-XP, the goal is to loot everything. Empty rooms, rooms with treasure-less traps or combat encounters may be safely left behind. Likewise, a small amount of money may be left behind, since it’s likely not worth the risk. For this reason secret areas and hidden treasures feature heavily, to reward clever and thorough play.
But these are far from the only feasible goals. In Castle Xyntillan, for example, its size and degree of secrecy makes looting every gold piece unfeasible, but looting big ticket items, like the Holy Grail, are discrete and attractive objectives. Clearing all the hostile characters from the dungeon would be all but impossible.
I can imagine some other win conditions. In a dungeon ruled by an cursed warlord, curing or redeeming the warlord. In a dungeon which presents a mystery, being able to answer a concrete riddle once you’ve gathered enough information from the dungeon and understand what occurred there. In a deathtrap dungeon, merely surviving to see the end.
What more goals like this can you imagine?