Appellate courts get to make such considerations, but not the lower court. The lower court judge can say "I believe the facts say X and therefore law Y should apply" but the appellate courts can say that the interpretation or Y or even law Y itself is incorrect and tell the lower court judge to reconsider the outcome of using law Y in that manner given facts X.