prosfilaes
Adventurer
Yes, they have.
Murder is not a crime against an individual.
It's a crime against the community, and most importantly from the point of view of the state, a crime against the authority of the state, its monopoly on the legitimate use of violence.
Which is why cops treat the murder of a drug dealer with all the seriousness of a cop killing. Powerful, dangerous individuals on the wrong side of the law can do a lot of killing among themselves in some places and the law will leave them alone.
"A state is a human community that successfully claims the monopoly of the legitimate use of physical force within a given territory."
Like Luxembourg. Open a dungeon beneath Luxembourg with trillions in gold and alien technology, and see how long Luxembourg stays a state. In Luxembourg's case, there are powerful neighbors that could come in and take over, but without that, I don't think it would take that many people armed with alien ray guns and biotechnology fighting over gold to overwhelm the cops of Luxembourg. Enforcing the rules that you leave the citizens alone and we'll leave you alone would go far in enforcing some sense of civil order.
I suspect most cities on the edge of megadungeons would have a goal of staying in existence. This means that you convince the evil adventuring parties that it's not worth their time to mess with the city, and this means letting adventuring parties (who are probably at least 4 levels above the highest-level cop) fight among themselves without interference. You take offense only when you have to.