There are two terms that come to mind, depending on what aspect of the situation you want to emphasize.
If you want to emphasize that the judges are deliberately evading the letter of the law, you could say they were engaging in judicial nullification. The phrase nullification is most often used in the context of jury nullification; from the Legal Information Institute:
A jury's knowing and deliberate rejection of the evidence or refusal to apply the law either because the jury wants to send a message about some social issue that is larger than the case itself, or because the result dictated by law is contrary to the jury's sense of justice, morality, or fairness.
However, the term is also extended to actions taken by judges:
Controversy exists over the issue of judicial activisim, in which judges are sometimes accused of nullifying law according to their own will, deliberately ignoring inconvenient facts and even settled rules of law in order to obtain their desired result. ("Nullify Law and Legal Definition", USLegal.com)
The term is not specifically related to sentencing, but it does come up in this context:
[O]ur system has traditionally empowered a judge to strike the jury's verdict entirely by grant of judgment of acquittal . . . . Can [it be] structurally offensive to allow a judge to take action based on concerns of the same nature but of lesser intensity by not nullifying the entire verdict but by imposing a sentence that reflects the court's honest assessment of the facts before it? (Bruce Antkowiak, Jury Nullification, 38 Creighton L. Rev. 545. Probably paywalled, but you should be able to see the title.)
Can a judge nullify or circumvent a law that is otherwise valid and constitutional?
. . .
Is an unjust, disproportionate sentence in the eyes of the judge such a moment? (Judge H. Lee Sarokin, "Should There Be Judicial Nullification?", Huffinton Post, May 25, 2011)
So you could say that
"The judge engaged in nullification/nullified the draconian sentencing law by stating that the thief had stolen goods to the value of 39 shillings".
On the other hand, if you want to focus more on the deliberate underestimation, the term shaving would work well. From Collins Dictionary:
- US to discount (a note, bill, etc.) by more than the legal or customary rate
- US, Informal to lower (a price, rate, etc.) by a slight margin
I'm not sure how much weight to put on the "US" in those definitions; Oxford Dictionaries also has, under its "British and World English" definition of shave:
2.1 Take (a small amount) from something.
‘she shaved 0.5 seconds off the British junior record’
2.2 Reduce by a small amount.
‘they shaved profit margins’
This term more directly emphasizes the intentional underestimation, but is not a specifically-legal term.
You could combine both terms to more clearly approximate your meaning:
In a classic case of judicial nullification, judges shaved the value of stolen goods down to 39 shillings (to avoid the mandatory death penalty imposed at 40 shillings and above).