In reality: are you a software engineer? Or do you know one? Surely you (or they) have experienced how difficult it is to write code that manages even a small number of inputs? Even 10 different yes/no inputs give you 1,024 possibilities.
Now imagine writing laws to precisely cover an effectively infinite number of possibilities, many of which don't exist at the time the law is written, and expecting the laws to cover these new situations and variables with absolute certainty and unambiguity. And unlike software, you can't just push a commit to prod to fix the problems as they pop up. It's a really long process, because democracy.
It's not happening, no more than you'd be able to handle a piece of software that took some infinite and random number and variety of inputs and did something useful with them.
We should, as you say, write "quality" laws to the best of our ability but there will always been a sizable human element to the interpretation of law.