I’ve been a coder on-and-off since the 1990’s, and an attorney for >10 years, in litigation. I actually disagree. I think legal writing is closer to programming in a lot of ways than it is to creative writing. They are all different things, but I’ve always found the parallels kind of interesting.
I'm constantly repeating Justice Holmes' adage that "the life of the law has not been logic; it has been experience." In my opinion, non lawyers vastly overestimate the extent to which legal writing and legal argument have anything to do with logic.
I had the pleasure of building software requirements from legislation once and discovered that everything left room for interpretation, made what seemed on the face of it a relatively well understood thing difficult to build.
If you want to make legal texts even worse to read and write, throw in a heavy dose of CS-esque structuralism.