The US is an outliner on prison terms and sizes etc. Under the surface it is hard to tell if the public lead the prisons or if the big prison business shapes public opinion but from the outside it seems crazy.
Different societies are at different places on the prison is for punishment to prison is for rehabilitation spectrum, and their reoffending rates reflect that.