In the centuries before prisons, there was slavery. In Hebrew society, a person convicted of a serious crime could suffer the penalty eg. stoning to death, having their hand cut off or eye gouged out. Or they could enter into a bondage contract for a specified number of years with a bigwig and serve out the sentence as a slave.
Which makes me wonder. Which would you rather do? Spend 15 years as a prisoner with no parole. Or spend 15 years as a slave, having no prior knowledge of how good or bad the slave owner is?
For myself, I really don’t know.