Answer:
The purpose of a trial is when all people cannot make the decision of disagreements between each other and cannot be formal about it and is taken to court for trial possibly, for the case to be heard by everyone. The judge role is to decide the decision of the case. The prosecutor's role is the person the person taking someone to court. The defense attorney role to defend the person facing the charges.
I do not understand why scientists would be related to law, though. Maybe for certain cases involving DNA? Idk, good luck! Hope I helped.