"The court system" is not a collective entity with a shared set of thoughts. Different judges, different arguments, in one case (but not the other) a jury, these things make a difference.
The appellate process and the system of binding precedent goes with it serves to somewhat make things more consistent overall than individual trial court processes would when considered over a longer time and a larger number of cases, but cases very close in time ending up with different trial court decisions despite broadly similar fact patterns are not really surprising.