Jürgen Hubert said:
Let's say the party goes delving into some dungeon. They slay some monsters, and find some magic items. So it's obvious that these items are legally theirs once they emerge from the dungeon.
Is it?
"Finders, Keepers" might be an acceptable solution for wilderness areas with plenty of monsters where the local lords are so glad to see some monsters gone that they ignore the wealth adventurers gain from going into the dungeons. But what about more civilized nations? Will they just let some dirty adventurers walk away with powerful magic items or large amounts of gold looted from their land if they catch wind of it? What gives the adventurers the right to simply take these items?
What is "the state" and what is a "right"? Those sound like terms from modern political science, whereas most D&D settings (published and homebrau) are based on medieval or dark age models (with a few asiatic settings thrown in as well). Most of the governments supposed in those settings are feudal monarchies, with a smaller number being primitive autocracies. Since the plundered treasure exists outside the web of reciprocal obligations I doubt that any monarch or lord will lay claim to it.
A typical fantasy medieval polity is not really a "state" and doesn't have a bureaucracy and doesn't have the egalitarian concept of proportional taxation. Everyone may be required to pay an annual tax to the king or emperor (or maybe both, and maybe the tax collector will try to squeeze a bit extra out of those he knows to have come into some money) but there's no Internal Revenue Service.
Suppose that there were a "royal decree" saying that the king claims 80% of all treasure recovered from abandoned places in the realm. Who's counting? Who's reporting? Who's keeping records? Probably nobody. Except under extreme circumstances, such news would probably never even reach the ears of the king. But if it doesn't reach his ears, then who will know and who will care? Not to mention the fact that any king making such a proclamation is rapidly going to find himself signing a Magna Carta, because I don't think that his warriors are going to be terribly amused at the idea that any swag they wring out of the countryside has to be handed over to the crown. After all, the king doesn't need the money but he does need happy warriors.
The situation is even more pronounced in most despotisms. They will likely have an even lower form of organization, and it will be more corrupt, which means the despot will probably never hear about the plundered gold. Only in a really small timer like a warlord is going to be (out of necessity, since he leads by personal charisma and prowess) personally involved enough to know about some band of nobodys pulling some loot out of an old ruin. He may send his troops to mug them, or he may invite them over for a feast and try to con the gold out of them that way (or just poison them), or just as likely he won't even care. But he would probably never put down a rule saying that treasure was owed to him, except in the case of those warriors directly in his employ. The warlord doesn't have tax collectors, although he does have some small time thugs.
In a feudal setting, if the gold gets taken away it will probably be at the hands of the local potentate who will simply send some of his boys down to the tavern and demand of the PCs an entirely ad hoc "tax" that is simply made up. Depending on the potentate and the henchmen, it may require a relatively small or large appeasement.
Every once in a while (more commonly in Sword & Sorcery settings) I expect that you will encounter an official who is greedy and ambitious enough that he will try to wrest 100% of the gains from the adventurers. This sort of thing probably happens to Conan all the time.
Anyway, in a setting like the Dark Ages (which is what a lot of fantasy settings resemble), is anybody really going to be concerned if you went into an old Roman ruin and dug up a bunch of coins? Probably not, I would think.