For me the key goal is flexibility and uncertainty management. Lawyers have traditionally been extreme generalists across non-law domains (consider the fact that lawyers think of themselves as qualified to question expert witnesses from all kinds of hard sciences in a courtroom) who have exercised a consistent social function in the face of all kinds of social, political, economic, and technological changes, and the lawyers who have been best able to insert themselves at the joints of those changes are the ones who have succeeded. Having some understanding of the ontology of the various systems that are likely to be important in the domains where the law operates is pretty much a general good. And right now, code plays such a huge role in the economy that lawyers who have some clue what's going on are better positioned to adapt to changes in the economy as their careers move forward. (It's for similar reasons, I think that Harvard Law School recommends students take a class in accounting, or at least used to do so back in my day.)
With a minimum base of skill in slinging around code, it expands my students possible options. They might never use it again, relying on legal tech/document management/whatever vendors for any of the things noted elsewhere in this discussion. Or they might see a need and builds something that becomes one of these legal tech/document management/whatever companies. Or they might win a client a decade down the road by being the only lawyer in the vicinity who speaks their language. Or they might be working for a nonprofit who doesn't have the resources to buy solutions, and build something in-house that increases their capacity for service delivery to people who really need it.
TL;DR: lawyers have their hands in a lot of stuff by the very nature of the profession; it behooves them on general principles to become conversant with anything that occupies a large amount of territory in said stuff.
 version 0.1 of the course: https://sociologicalgobbledygook.com