The main purpose of prison is not rehabilitation, or deterrence, but to put dangerous individuals away so they cannot terrorize others. This is why we put rapists in cells (or, at least we try to) - every year in a jail cell is a year they aren't raping women.