Earlier quoted context omitted.
The main purpose of prison is to act as a disincentive. A lot of people don't commit crimes in the first place because they are scared of going to prison.
I think that assumes that they are in the same state of mind of a well balanced person. If they are hungry, tired (of life), scared, have no other option then the risk reward may skew to them thinking that the risk of prison is worth it.
How else would you explain the widespread of tobacco smoking, over-eating, and other behaviors that are extremely dangerous but not immediately punishing?