Except that you usually can't do crime while in prison.
If somebody is willing to risk 5 years in jail over a nickel-sized bit of cocaine, they already have a serious deficiency in ability in figuring out the probable consequences of their actions. Nobody has been very good at fixing that problem, so just having these folks off the streets is probably the best we can do.
That’s the problem, isn’t it. The vast majority of criminals are bad thinkers. Just like the vast majority of welfare recipients. They are short term thinkers, hedonistic, and lacking in self-control. Prison doesn’t fix that. It just takes them out of the pool for a while.
We need a better system both for prisons and welfare.