To be sure, this can fail. You get a bunch of jurors who are ignorant or evil in a coherent way, who decide to ignore the law and effectively lynch a man because he's black or back up the school administrator who wants to teach creationism or Jewish space lasers or whatever. Personally, I think that's an acceptable risk, in part because if you take the application of the law away from sentimental flawed rational animals you have to give it to someone else - someone (or something) with power and sitting in the seat of authority. In a sense one way to characterize democracy is as a constant struggle between jury (electorate) and judge (political leader). The way the jury system is supposed to work, the fact it was written into the Constitution, is indeed very important and I'm glad for this sub-thread is talking about it.
I hate to say it, but there are times when something is illegal, but the scenario challenges that in a super compelling way. JN both brings that to light and gives a jury that opportunity to support an actor who has a valid basis for their actions.
I feel similar dynamics surround mandatory sentencing.