@dalehileman,
Yes, competence of those all involved, but we know that isn't true. When 12 humans with different backgrounds are involved as the jurors, they're going to perceive the trial in their own subjective ways. Also, the competence of the judge and attorneys will impact the outcome of any trial.
Having said all that, it's still the best way to arrive at the judgment of guilt or innocence. Unfortunately, any judgment is fraught with errors.