I've read that another reason is to try and get people who are a bad influence out of the area. For example, some parts of Baltimore are so bad that there is almost no chance for kids growing up to have a life not influenced by violence, so they just try and lock people up as long as possible so they won't be a negative influence on the people in the area. Trying to rehabilitate them would probably be pointless because they are going to go back to live in the same shitty situation that led them to a life of crime in the first place. It'd be like sending an alcoholic or drug addict who just finished rehab right back to the same people and circumstances that made them need rehab.
It's too bad there's no free land to exile people to any more. (I mean, we could build walled-off exile colonies inland, but that'd be pretty dystopian, unless they could somehow get from there to other countries that aren't exiling them.)
Honestly, the situation in too many places- okay, one is one too many, so way too many places- is like taking someone home from rehab and dropping them off at a liquor store.