I see what you're saying. A computer programmer accused of a hacking crime should only be judged by other computer programmers, since they understand the domain.
An artist accused of selling fake fraudulent paintings should be judged by a jury of artists, since these would best understand the techniques used to make paintings and could interpret the evidence to determine whether it was fraud.
Toyota cheating their emissions should only be judged by a jury made up of members of large car dealerships, mechanics, car repair services, etc. These would be best equipped to understand what exactly was done where in the pipeline, and interpret the evidence for or against them.
When a Goldman Sachs executive is accused of fraud, only other Wall Street investment bankers should be on the jury as these are his peers and the only ones who understand the complex financial instruments being used.
Jury randomisation has positives and negatives. Yes, it means that juries are unlikely to have the necessary context for a case. It's the job of the attorneys and expert witnesses to provide that context. This is not a good thing, and can cause miscarriages of justice. This is why appeals are a thing. On the other hand, you get a more statistically consistent justice system with jury randomisation. Not to mention that you immediately lose any bias during the jury selection (on which criteria should I pick a "peer"? random selection is much less prone to bias). The job of the justice system is to aim for consistency as well as justice (it would be unjust if the courts were not consistent -- yeah, yeah I know).
The law is not a programming language.