Almost everyone who commits crimes while expecting to get caught is in desperate circumstances (near starvation, jail preferable to available housing, loved one in big trouble, etc.), where the time isn't a big deterrent, either.
It's much more effective to increase (at least the perception) of the probability crimes will be caught and prosecuted. Excessive jail sentences presumably result in greater costs, meaning less money available on the investigation and prosecution side. (Yes, this makes faulty assumptions about how government budgeting works in practice.)