A good lawyer, like a good programmer isn't valued just on their output, but on the questions they ask that lead them to the correct output. This is much more difficult to encode.
Law can be pretty verbose. Given half a paragraph, how often can an intelligence (artificial or natural) deduce what's next?
Of course the coding AI has the advantage that coders write (and publish) comments.
And writers in law write commentaries, some of them having great authority.