The same reason judicial decisions (especially appellate ones) applying those laws are also put in writing, and the same reason that such decisions are binding on lower courts, and considered persuasive though not binding authority for other courts in applying the same law.
Because that's what the courts rule based on, it's just that the initial version of the writing (the legislation) is often ambiguous so the courts add more writing over time.