The length of prison time seems to me to have multiple aspects to them beyond just rehabilitation or retribution. Often it seems like the purpose is to send signals in order to set social norms, to discourage future criminals, to remove threats, and fairness when compared to worse or lesser crimes. People often debate the rehabilitation vs retribution aspect, but I rarely see people discuss the others.