It is very clearly a deterrent. So you think anyone who ever considered committing a crime was never deterred by the possibility of prison? People say all the time “I was going to do X but I didn’t want to go to prison” that prima facia is an example of deterrence to the extent that many such people were serious. Honestly, I shouldn’t need to use such a banal example for something so obvious.
Furthermore, you are therefore implying that if we did not issue any prison sentences then we would have the same amount of crime as we do now (or possibly you think it would be less) because the threat of prison has no effect of deterrence. That is unbelievably ridiculous.
The people who committed crimes weren't deterred by prison sentences. Once they're released from prison, they will continue to commit crimes. Prisons don't work.
Let's put it this way - suppose someone is too illiterate to get a job (like a huge chunk of the prison population) and turns to theft to support themselves, possibly because they have a drug habit. Does locking them in prison make them any more less addicted to drugs, or any more able to get a job? Does it actually solve the underlying problem?
Furthermore, you are therefore implying that if we did not issue any prison sentences then we would have the same amount of crime as we do now (or possibly you think it would be less) because the threat of prison has no effect of deterrence. That is unbelievably ridiculous.