Criminals no longer really fear our system of justice. Judges can in some cases be bought. Courts are so jammed that plea bargaining and reduced sentencing are routine matters. If in the rare case a man is sent to prison, he only learns to hone his skills to a fine art. There must be a better answer, and thankfully there is.
Prisons are an ungodly creation of man.
As long as men persist in being ungodly by ignoring God in building their own social order, they will suffer the chaotic fruits of their evil systems. In biblical law, prisons as we know them and prison sentences are unknown. Prisons were quite common in the nations surrounding Israel, but they were not a part of Israel's law system. That, of course, was not the result of the fact that all Israelites loved God and kept His Law from hearts inspired with gratitude for His goodness. It was because God in His infinite wisdom saw fit to restrain evil in society another way.