The Law was a Schoolmaster to bring us to the wonder of the justification from sin by faith in Jesus Christ, Galatians 3:14 (KJV).
The Law is internally consistent and applies to all people everywhere. For the Law to be effective, there must be a just Judge. There are natural consequences for sin, but there are also judicial consequences. These are imposed fairly by the only unbiased judge.