Steal a car to rush somebody to a hospital then return it after and the letter of the law will convict you as a felon. It is the jury that could decide, as representatives of the community, that you should not be a felon for saving somebody's life even if you technically stole a car.
In most states the jury instructions are to make their judgement based solely on the evidence presented to them. These instructions make a jury a cog in the prosecution machine. The purpose of a jury is a final check on the government's execution of the law by members of the community.
I think you're think of grand juries. They decide if there is enough evidence to go to trial, I.e. if the prosecution is just.
Even without grand juries, we'd still have juries that decide the verdicts. They decide if a conviction is just.