The Torah has no concept of prison as a punishment. Why? Because prison is a futile place. A place where you are told, "You must be here, but you must not change what this place is. You will grow older, but you must not take charge of your life. You will live, but you must not give life."

But a living human being must make change in his world, must take charge of his life, must give life to others.

There are times G‑d will put a soul in prison — often a very lofty soul, such as Joseph. It is like being held in a vice. Squeezed with the ultimate of futility, the deepest powers of the soul break through.

The worst prison is when G‑d locks you up. He doesn't need guards or cells or stone walls. He simply decides that, at this point in life, although you have talent, you will not find a way to express it. Although you have wisdom, there is nobody who will listen. Although you have a soul, there is nowhere for it to shine.

And you scream, "Is this why you sent a soul into this world? For such futility?"

That is when He gets the tastiest essence of your juice squeezed out from you.

See also:
The Black Carriage
Days of Light