Length of sentence has very little to do with rates of recidivism, or lack thereof. For example, the US has ferocious sentences, and very high rates of recidivism.
And generally when people are committing a crime, they 1. aren't thinking that they'll get caught, or 2. don't think they'll get caught.
Or even, 3. are so desperate, they are prepared to run a high risk of being caught.