Suppose you are a first grade teacher. One of your many jobs as teacher, besides educating the children, is simply keeping them safe and relatively happy. In the first few minutes of the day Sally runs up to you crying because Tommy yelled at her. So in an effort to keep the peace you set out a simple rule: "No screaming." Sally walks away content and you pat yourself on the back. What a good teacher I am.
"What about recess?" Tommy asks. "Surely we needn't maintain quiet voices during playtime?" Ignoring Tommy's uncharacteristically sophisticated grammar for a six year old, you think, He has a point, so you revise the rule: "No screaming, unless it's recess."
Just then a crack of thunder rings through the air and it begins pouring rain. Looks like it'll be indoor recess today. Twenty minutes later you're fending off a migraine from being confined in a classroom with thirty screaming children. Okay, new rule. "No screaming unless it's outdoor recess."
Five minutes later while you're busy washing paint out of Megan's hair you hear a crash and spin around to find Tommy has dropped several boxes of lego on the floor. "Why didn't you ask me for help?" you ask. "I did," he responds, "you just couldn't hear me over the sink." Okay, new rule: "No screaming unless it's an outdoor recess or you need help."
Suddenly there are 15 screaming children asking for help. "WHAT COLOR SHOULD I MAKE THE DOGGY?" "THE HAMSTER LOOKS HUNGRY!" "I NEED MORE GLUE!"
Looks like your definition of "help" needs some clarifying, but even if you were to figure out exactly how to define "scream-warranting help", could you expect the children to understand or even remember all the details? And thus, the judiciary branch is born.
Considering how hard it is to write succinct, fair rules for a simple children's classroom, how much harder then would it be to write a book to govern an ever-changing country full of citizens with concerns quite a bit more complicated than finding more glue? The problem with such a grand task is that it is impossible to write a text capable of treating every variation of every conflict with perfect justice, so you end up writing generalizations that hopefully cover the vast majority of cases, and leave it up to the lawyers and judges to figure out the hazy areas. You write keeping the general interest of society in mind, including incentives for progress and economic growth, but in so doing you necessarily overlook some of the cracks in the system where regular citizens occassionally get caught. Which brings us to my next topic: Legal Priorities: Society Before the Individual.