Discretion of a human judge is grease on the gears of law.
Moreover the content and legal rules predetermines what will be written in such legal documents down to the phrasing. While there will be differences, it's not "free writing"/"express yourself" kind of thing.
To me it seems this would make things much clearer to parties involved, and reduce opportunities for abuse compared to many pages of boilerplate and only a few lines that matter.
That said, a lot of state law is kind of like what you describe. An initial law, and tons of differences applied on it. E.g. article 3242 clarifies article 432 and adds the provision to do so and so.
Two disclaimers. First, IANAL. Second, "standard" really means "a lot of people do it this way", not "this is recognized as the right way to do it".
This is already not the case -- at least in a common law system like is practiced in most of the US (and other Anglo-Saxon countries). Even if a normal person can understand the legalese, they can't be expected to know about the history of court cases that have reinterpreted and redefined the laws in question in various ways.
Why else would it take so much training to become a lawyer?
Similarly, applying rigid code to law can make some crazy results, like the guy who got 25 years for stealing a slice of pizza. It was his 'third strike', and because the slice was stolen from a minor, it was classified as a felony. No sane person would argue for 25 years for a slice of pizza. However, the 'hardcoded' law demanded that, so the people are left picking up the bill for 25 years of imprisonment over a $1 food item (independent of any moral arguments on the issue).
Finally, 'ethics' is ridiculously hard to clearly classify, and if we can't classify it, we can't encode it.
I really can't see how this is so.
What about a law
Modern law is supposed to be open, so that anyone can read it. Reencoding laws, for whatever reason, strikes me as being fundamentally undemocratic.
The argument can be made that if legal "code" is taught in schools, then it's no more undemocratic than writing down law, but the chances of that happening seem slim to none.
Another argument is that law is already written in "special" English that most people can't figure out, but I think that having it in English alone is a big step toward having it being readable by almost anyone.
It would be neat to have law written as code and to have AI be able to parse it for you in lay language -- that is, you could ask it questions or pose situations to get a legally-binding answer. But then the question for me is, why don't we just have said AI read the current legalese and parse it?