This is all based on the vengeance-fuelled concept of “retributive justice”. This is not a model of thinking that has much merit. Imprisonment in the criminal justice works by deterring individuals from crime (prison always will be a deterrent), and incapacitating criminals, making them unable to commit crimes due to the fact they are in prison. The intent of prison is to prevent crime, not to impose harsh conditions of punishment.  Imprisonment with legitimate utilitarian goals is acceptable. Simply inflicting conditions on people for no practical reason is mere sadism.