In both cases, texts readable by humans with special training, are used to manage something. In both cases, it is better to start with a text that has a history of success and a community of users. In the case of law, there is an additional reason, of great importance. The text does not run "deterministically" on a machine, it "runs" in the minds of people, and the people whose minds count most are strangers to the transaction - judges, litigators, management, insurers, creditors. Legal text runs socially.