The dungeon boss that captured you presents you with a fresh new set of metal restraints, made from smelting down all your armour, equipment, and coins, since you won't be needing them anymore
The chastity cage is even made specifically out of the dagger you stabbed them with, which is also why it was designed to never ever come off :3. Just a constant lil reminder of what happenes the last time you tried to fight them~