In his last book, The Hedgehog, the Fox, and the Magister's Pox: Mending the Gap Between Science and the Humanities, Stephen Jay Gould argues that science and the humanities are two distinct areas of intellectual authority, or "magisteriums". Science concerns itself with what is, and the humanities with what ought to be. Science describes and predicts, while the humanities prescribe. For example, the social sciences study how people behave in fact, while ethics concerns itself with how they ought to behave. One can never subsume the other; the claim of reductionists that science can eventually include philosophy is misguided, according to Gould. With this given, the most interesting cases will be on the boundary between the two magisteriums, where the techniques of both endeavors might apply.
Jurisprudence traditionally falls under the humanities. Laws prescribe how people should behave, and the justice is the process of ensuring that they do. On the other hand, lawyers have a lot in common with software engineers. Both write code where every word and punctuation counts, and both spend a lot of time worrying about edge cases.
This deep similarity leads software people to be disturbed and outraged when a legal case goes against them. They study legal code and treat it like a program; when it runs in the legal machine, they feel it should give a predictable outcome. In fact, law is rooted in the humanities: the decisions of judges and juries include moral judgments: how ought someone to have behaved, what does justice require to be done. While the process no doubt has a lot of factual content - a judge has to establish the facts, and only then apply the law - applying the law is subjective; it's hard to imagine a machine doing it since this application needs to consider human motives and morals. Even establishing the facts is not a purely mechanical process; it is based on establishing the truth, which is different from demonstrating a mathematical proof, even in scientific terms (see Godel). Deciding which facts are germane to a case is even more complex.
The judicial process is unpredictable; ethical and moral judgments can't be computed, and we have to depend on fickle humans to do the work. Hence the willingness of lawyers, engineers and business people to settle cases before they go to trial; they may end up paying out in spite of when they believing that they're in the right, but at least the outcome is more predictable than going to court.
This uncertainty, even beyond the complexity of the humanities in general, is due the law's location in the borderlands between the scientific rigor of code, and ethical concerns of justice.