I would add the concept that the law, unlike software, is capable of openly defying logic. Courts are permitted to dismiss case law and rule in a completely new and unforeseen direction. That's how caselaw evolves. Someone breaks the pattern and, should others agree, that new thinking is adopted as new law.
All the important case, all the ones lawyers rely upon in arguments, began with a court or judge breaking from the pattern. That's why they progress up to higher authorities. That's why they supersede previous caselaw.