God is omniscient—when setting up the human justice system, he knew man would make false oaths and bear false witnessing or raise a false report against his neighbor, friend, or family member. Judges and juries were set in place to safeguard against false reports along with each witness examined separately to minimize collaboration and escape detection of falsified testimony.
One of the first things that I learned, when reading Genesis is that God is the God of order and he does all things with a purpose, with order and to Glorify him. Why? He is our creator, so we should glorify him for everything that he has done for you and me.