There are three theories at work in our system.
1.rehabilitation which works in some cases but probably not a majority.
2 punishment which is based on that one commits a crime they should pay a price.
3 Get them off the streets, which is the most practical, in my opinion,
These three theories tend to conflict and cause confusion in the overall system. I personally favor rehabilitation where it is realistic and otherwise remove them fom the general population for the sake of public safety.