That's basically the entire premise behind a jury trial.
In reality, the jury has to follow the law as written and there are gaps with various consequences.
If they try to make some ruling outside of the law, it would just get appealed and oveturned.