Legal codes aren't meant to work like programming languages. It is impossible for a legislator to predict how the world will work when their law is applied, and it is highly unlikely that they will anticipate every situation and context in which their law will be invoked.
Judges and juries and lawyers all exist to help us interpret the inexact legal code in a way that is (hopefully usually; but obviously not always) fair and reasonable given the often-nuanced situations at hand.
That doesn't add up with how the average piece of legal code looks. Even when I read a brand new piece of legislature it's an impossible soup of words, attempting to document every possible edge case the legislators thought of. If the point was to leave room for interpretation by a judge and you concede yoy don't have full context of how what you're writing will be applied, surely you could write much more sensible and human-readable text.
It adds up to how the average piece of legal code works in practice.
Law is political. It's persuasive, not deterministic. It often comes down to a judgment based on the relative political power of the entities in question.
Even if you find a statute that says very clearly that X is unlawful, there will be situations where a lawyer will argue that it isn't.
Sometimes they'll make that case successfully - for various possible reasons, not all of which will be lawful themselves.
This is one reason why statute law is expanded by case law. And good luck trying to automate case law.
I would be happy if the law conforms to other existing laws, not future edge cases. The solution being proposed here would do that, while the existing system would not.
Judges and juries and lawyers all exist to help us interpret the inexact legal code in a way that is (hopefully usually; but obviously not always) fair and reasonable given the often-nuanced situations at hand.