You know what's lame in gaming? Paying taxes. No one likes to figure out their taxes in real life, so I'd rather not pass on the pain to my gamers on their day off, either.
Therefore, no taxes and tithes of treasure taken from the dungeon. DMG page 90 be damned!
But it stands to reason that any sizable (and armed!) civilization might want to impose taxes on wealth coming into that town in the hands of adventurers. "Finders keepers" is fine, generally, until you find so much the local nobility or local authorities notice.
So I needed to find a justification for not taxing the PC's finds that also has a good in-game explanation that passes the verisimilitude test.
"Today, my jurisdiction ends here."
Sheriff Langston (aka John Cleese)
The history of my megadungeon has placed it repeatedly out of the official royal lands. It was originally a wilderness controlled by an evil cult, which was then stamped into extinction (or so they say). After, it was a borderland claimed by Lord Sterick the Red, self-proclaimed Baron, who made it into his baronial seat. That affront was also put down by the authorities, who expanded the town he'd built but otherwise simply burned the castle outbuildings and left a bunch of holes in the walls of the castle.
During that siege and defeat of Lord Sterick, the then-king made a proclamation that everything taken from Felltower and its environs, and everything taken from within the tunnels beneath it, belonged to the taker.
Why do this? (in-game)
The royal control of the borderlands is, and has always been, weak. There wasn't much money then to raise enough of an army to crush Lord Sterick and then chase his men into the dungeons to finish the job. Offering free-and-clear loot without legal obligations and repercussions helped get that job done.
There isn't enough money to afford to raise a big army just to deal with monsters and such on the fringes of the kingdom. Letting people freelance and do it, whether nobles or freemen, bleeds off potential troublemakers and keeps the borderlands safer at no cost to the royal treasury. So the theory goes.
Plus the borderlands aren't even technically claimed by the kingdom, and never have been. The dungeon is foreign territory. A claim could be made, but it would need to be made to stick . . . and then it could be held that the king is responsible for any shenanigans that go on there. No, better to leave it. Why claim a dangerous area as your own problem? So even that pronouncement is more an acceptance of reality than a real statement of claim. It's no man's land, so it's no man's treasure until it's found and dragged back to civilization for spending.
The King is also a slightly limited king, much less than a total autocrat who personally owns the state. More "King of England plus the Magna Carta" than "Pharoah" or "Sun King" or "Tsar." The state is also at war off and on with its neighbors off to the south (aka out of the limited sandbox area). This consumes even more resources, and pulls talented soldiers and ambitious nobles away from Stericksburg and Felltower. It also consumes attention, and while it does increase demand for coins and wealth it doesn't give them the resources to go and get it from recalcitrant adventurers.
So the law says what they find in Felltower is theirs to keep, free and clear. It also implies some other things about actions in the underworld, but those aren't strictly stated in law.
Why do this? (out-of-game)
Gets rid of the extra step of taxing the treasure, figuring out who they pay, dealing with evasion, etc. Generally, eliminating an un-fun aspect of wish-fulfillment treasure finding.
Plus it deals with the elephant in the room - why isn't the King taking a share? Why isn't there an army on the dungeon, enforcing the rules? Why aren't the PCs getting arrested after they slag another group of adventurers for their stuff or kill 3d4 bandits on Level 1?
Because it's not illegal, that's why. The law says so . . .
Now let's go kill some owlbears!