A nation populated and rules by rogues, crime is rampant and as such a unique method of correction has been adapted.
When convicted of a crime, criminals are temporarily confined to one of the many dungeons in the land. If they manage to escape alive, their crimes are forgiven. Each major settlement has a dungeon with a unique design. Criminals are sent to the one nearest to crime scene.
The prisoner has the option to do their time or escape via a forced dungeon crawl with only some basic equipment. But rogues are resourceful and there are multiple ways of escaping despite being only one exit.
Should they just do their time and be simply released, they lose a lot of respect and are considered a lowly coward. But should they attempt the escape and survive, they gain some serious reputation among the populations as someone not to mess with.
These dungeons are well guarded by monsters, guards, and traps. Not to keep prisoners from escaping, well, they sort of are, but they are a basically part of a "Trial by Dungeon Crawl" if that's a thing.
Any stolen goods along with their own gear are kept in an "Evidence Chest" guarded by a soldier and perhaps a trap or two. It depends on the dungeon. Should the prisoner manage to reach this, loot it, and escape out the exit, those goods are considered theirs now. Otherwise should they choose to wait for their release, they only get their own stuff back.
Prisoners are permitted to work together in an escape. However they are not permitted any outside help. Most prisoners who choose to try and escape do not make it out alive. Also once they manage to leave their cell, it closes and locks behind them. There is no going back. You have to run the gauntlet.
The Evidence Chest is locked and must be picked or the key must be taken from the guard who has it should you chose the escape option. How that is done matters not. There are plenty of unemployed people who can replace them. Don't think you can just forget looting that chest and slip out the door though. That key also unlocks the exit door which cannot be picked.
A magic suppression field surrounds the dungeon restricts the kinds of magic that can be used there.
Some dungeons are more advanced in technology and security then others. They can be in cave systems, ancient ruins, abandoned castles, etc. Their design can be relatively linear to complex multi-path mazes. The cells to hold the prisoners are located in the center or back of the dungeon.
Because of the fact that hardly anyone successfully escapes from these dungeons and that simply waiting for your time to run out is going to get you shunned by most of the land, it serves as an effective deterrent to all but the most resourceful people.