Well, this is going to send us down a rabbit hole but the reverse is also true: there are multiple interpretations of a given law and the judge tries to use their judgement to square the law with the facts.
(Rabbit hole because I sense this is a debate lawyers have all through law school, and there are various schools of thoughts about the nature of the law etc)