> Law doesn't work like that
This is partly because the law predates compilers and modern communication. Why should a crime get different sentences? Often because judges are humans and somehow that makes it okay to lock some people up for years longer than others.
Your example is somewhat apropos because one of the more algorithmic portions of law is sentencing. Since the 1980s (i.e., after the development of compilers!), the US has enacted guidelines for sentencing (see https://en.wikipedia.org/wiki/United_States_Federal_Sentenci...) that allows anyone to read the criminal complaint and compute the expected sentence via a calculator (e.g., https://www.sentencing.us/).
And yet the sentencing guidelines are not binding on outcomes, in part because of the necessary flexibility in law. Sometimes you crunch the numbers and you get absurd results (SBF's fraud conviction is a good example I ran through myself), and so you need the flexibility to throw the algorithm out when the algorithm produces wrong results.
No it isn't, at least not in common law systems like the US. It is part of the principle of how statutes are drafted that they will be interpreted by human judges and shaped by precedent. It's not a technological limitation.