> Judges often complain about sentencing requirements in the law
The laws, e.g. the U.S. sentencing guidelines, give you a pretty wide range for any given scenario.
> I'm pretty sure judges look carefully at other sentences for similar crimes and criminals (precedent)
Not really, at least not formally. Within the guideline range, it's mostly about extenuating or aggravating circumstances unique to the case, not a comparison with other similar cases.
> and I know many courts use formulas that consider past convictions and other factors in determining a sentence.
The sentencing guidelines do use formulas (add X points for prior criminal history, add Y points for amount of money stolen). That doesn't mean they're not totally ad-hoc and unscientific.
Here are the federal sentencing guidelines for larceny, theft, etc: http://www.ussc.gov/guidelines/2015-guidelines-manual/archiv.... E.g. if the amount lost was between $200,000 and $400,000, you add 12 points to the score. If it involved more than 250 victims, you add 6 points.
There is no science or rigor here. Just the drafters of the guidelines picking round numbers of dollars for one column and increasing the other column two levels at a time. What purpose does it serve to sentence someone differently based on whether they stole $350,000 or $450,000? And what impact does the difference in sentences have on things we care about: deterrence, recidivism, etc? It doesn't: It's quackery. It adopts the pretense of science without being in any way scientific.