I think you've described the "punitive" notion of prison. There is, as I understand it, also a "reformative" notion of prison: removing dangerous people from society and attempting to rehabilitate them.
In the US, I believe the overwhelming preference of the public (the "obvious layman view") is that prison should be punitive. Other cultures seem to find success with more rehabilitation-focused approaches.
In the US, I believe the overwhelming preference of the public (the "obvious layman view") is that prison should be punitive. Other cultures seem to find success with more rehabilitation-focused approaches.