No that is not what is boils down to, i dont even agree that prison should be viewed as a punishment at all
Prison should be for separating a person that is a danger to others until such time they are no longer a danger to others. Judges often have a bad record at picking who will be a danger and who will not thus by default for public safety the public demands people convicted of crimes be sent away for a long time to maximize the possible safety of the public at the expense of the individuals that get caught up in the system