The courts weren’t established by any “God”, they are human-created institutions and suffer from the same failings as anything else humans have created.
Next, you’ll tell me King George III was “divinely appointed” and therefore American independence was immoral for violating the said king’s diktats.
Justice is part of God’s integrity.
After the Tower of Babel, national governance was an institution provided by God for believer and unbeliever alike.
Old Testament theology provides volumes on the basic element of justice, courts, and a judicial system to enforce the law.
Those who seek justice independent of God, have a fundamental problem with righteousness. Those who seek righteousness independent of God have a fundamental problem with Justice (e.g. Islam).