Laws, at least in many European countries, are prefaced with a preamble, introduction, or Vorwort, that explains a bit of the history, the motivation, the underlying principles, the philosophy, the practicality, and the guidelines for interpretation of that law. The words, as written, are not to be taken, in any case literally. Moreover, a literal interpretation contradicting the spirit of the law is unlawful, and that is one of the principles of many legal systems. Using a loophole that contradicts the law is unlawful; imagine the law says you have the right to water your plants in your balcony; however, you only do it when the neighbor below is sitting at their balcony with the intention to bother them: you are abusing the law and committing an unlawful act.
A law system like that requires wisdom. America has a lot of smart but almost no wisdom, so it would be chaos and anarchy if we suddenly switched to such a system.