Programmers often use a framework to make their job easier. Legislation is a type of framework and when you're drafting a contract (a program) you can sometimes opt-in to provisions contained into legislation. It makes your job a lot easier as a lawyer, but they will also need modification. This is a very general comparison but it holds true (imo).
Pushing code is similar to having your contract (program, remember) tested by a court.
variables, functions, all these things have their equivalent in the law, but somehow getting the hang of programming seems a lot harder.
Syntactical errors and typos are frowned upon in the law, but they happen all the time and they don't break the whole system
Sigh...