Well, that's incompatible with a common law legal system. Common law literally means that we respect legal traditions that aren't always codified and are instead established by precedent and/or consensus via tradition. That's the reason you'll sometimes see precolonial British law cited in US legal memorandums or court rulings - those laws literally are not part of US legal code, but they may provide persuasive precedent.
So there not always a codified law to read, but that doesn't mean people can't be expected to uphold the societal structure.
The same works in reverse. If a law exists, it's possible for the law to become legally unenforceable (for a variety of reasons, not just court rulings) even without the law being repealed. So merely providing access to the legal code doesn't actually provide a complete picture of what the law is.
Engineers want to think about the law the way they think about code - it may not always do what you expect, but Von Neumann architecture means that it's at least consistent. But that's not how the law works - it's not always clear ahead of time what the inputs are (which is why litigation is so complicated), and that's even before you account for the judgment calls that enter the picture at different stages.