Writing the law is like writing code. You can attempt to reason through each instruction and apply all sorts of static analysis, but you can't actually be certain it will work until you try to run it in production. The courts are the debugger for legal code. Courts attempt to interpret what the letter of the law means and how it applies to the very specific scenario in front of them.
Consider a law that simply states carrying a sword in public is illegal. Without common law, this rule applies in 100% of scenarios unless explicitly stated otherwise. If a foreign dignitary comes and expects officers with ceremonial swords, they all go to jail. We interpret law because the ideal vacuum universe in which the law was written does not have unforseen circumstances. A court applies an interpretation to circumstances to come to the judgement that diplomats are allowed to have ceremonial sabers in their entourage.
Think about it some more and ask yourself how a society could function in the long term without the ability to reinterpret law to fit particular circumstances. Every law rigidly applied exactly as written forever into the future. The only option to revise a law is by passing a new one.
https://en.wikipedia.org/wiki/Common_law
Law is often open to interpretation. Take a look at how most laws are written.
It might say "owning a sword is illegal", but then the courts have to interpret whether the sharpened blade you are carrying meets that definition.