What God does is always right. We can never accuse Him of injustice. Everything He does is fair. The Requirements of God's Justice If God is truly just and always acts in harmony with His holy nature, then He must show His displeasure with sin by opposing it and punishing it wherever it exists. He cannot enact a holy law, threaten a penalty, then take no action when His law is broken.
Scripture makes that quite clear.
Since the violation of God's infinitely holy nature demands an infinite punishment, eternal condemnation can be the only just penalty for sin. But it is the only response which is consistent with His holy nature. However, God loves sinners and since He finds no delight in punishing them, He has devised a plan by which they can be delivered from the just penalty of their sin. Justice allows for one person to substitute for another, so long as no injustice is done to the rights of any person involved. So God provided a substitute.