You're making a lot of assumptions here. 1) There is no crime in prison. 2) The imprisoned would have kept on committing crime for their total sentence if they were not in jail. 3) Prisoners 'return' to the world committing the same type/volume of crimes that they were committing when they went in.
For #1: There is crime in prison, a whole lot of it, and (even if you don't have sympathy for criminals) it's bad for society; people may come out worse off than they went in, driving crime up further. Jail is an intense experience, and it seems like the skills that you develop while 'surviving' in jail may not be so constructive for society when you're released.
For #2: As a kid my friends and I made a lot of stupid mistakes and some pretty bad decisions. Purely arbitrary factors (race, affluence, geography, etc) meant that none of us were ever locked up for them. We had the opportunity to correct our behavior, grow out of it. Had we have been punished harshly, it's likely that that our bad behavior would have continued. This is due to #1 (exposure to crime/criminals in prison, and contact with the justice system), but also loss of opportunities, and probably a different exposure or experience with drugs.
For #3: The above two points lead to the possibility that people who come out of jail are more likely to engage in more or worse criminal activity when they're released than when they went in.
So while there need to be consequences for crime, it's not at all evident that increased incarceration, certainly the way we are doing it, would lead to reduced criminal activity.