Actually, criminals aren't that rational, b/c crime rarely pays (white collar crime is a different matter, especially big money crime like tax evasion on a grand scale, consumer fraud, etc.). Street crime, even drug dealing, rarely pays very well, studies of drug dealers found only a very small minority make better than fast food wages (long hours on the corner) before factoring in risk. So it's a tournament, much like acting and music.
What deters crime is not the severity of the sentence, but the probability of being apprehended and convicted.
Which is why gun and ammunition registration and control is so important, if illegal guns can be easily traced to crimes, gunowners have strong incentives to secure their guns (the glove compartment in your car is NOT secure) and homicides were solved at a much higher %, that would do far more to deter violent crime than longer sentences.
The reason this probably works is self-selection - criminals are probably biased in terms of the their perception of the odds they'll get away with their crimes, so a higher rate of solving crimes causes them to re-evaluate their odds of avoiding arrest and conviction.