A person is put behind bars so that they don't escape. When I wrote that they took away the weapon, I assumed that you only carry it with you (not counting potions), and everything else is in the cabin. But if you carry tools that could potentially be used to pick a lock, then they took those away from you. They're not that stupid to not check the pockets of someone they're throwing into a cell for things like that.