Conceivably, you could run trials by having a judge (or panel of judges) bring forth the evidence they thought was important. Instead, many countries have a system where one party prevents “one side” of a case and another party presents the “other side”. How did this come about?
Just to glom onto this correct answer, the system OP describes is the ideal for prosecutors. It’s not supposed to be adversarial. The prosecutors are supposed to exercise their judgement and seek justice, not victory. Unfortunately, prosecutors are evaluated on conviction rates.