To me, the length of sentences in the US suggest that a primary purpose is deterrence, not merely keeping dangerous people off the street.