Torah delineates a variety of punishments and penalizations, but imprisonment is not among them. Torah describes Joseph’s incarceration as a feature of the Egyptian ‘judicial system’ – not as a recommendation. In Torah law, prison is not mentioned at all.
Mikeitz: The Correct Form of Punishment
M