Indeed, nearly everything is purified with blood according to the law, and apart from the shedding of blood there is no forgiveness.” (Hebrews 9:22, LEB)

Here is the law of forgiveness:  If there is no blood shed, there is no forgiveness.  Why did it have to be this way?  Because had God simply overlooked sin, he would rightly have been accused of being an unjust, unrighteous judge.  A good judge, one who is faithful to the law, must carry out the prescriptions and requirements of the law even when he does not want to.

How could God both forgive sins and still be a good and righteous judge in the process?  I’m glad you didn’t asked.  Paul tells us:

for all have sinned and fall short of the glory of God, and are justified by his grace as a gift, through the redemption that is in Christ Jesus, whom God put forward as a propitiation by his blood, to be received by faith. This was to show God’s righteousness, because in his divine forbearance he had passed over former sins. It was to show his righteousness at the present time, so that he might be just and the justifier of the one who has faith in Jesus.” (Romans 3:23–26, ESV)

God showed that he was both a good and righteous judge and the one who could and would forgive sins by pouring out all of his wrath on Jesus instead of us.  God did all the work, we get the justification that we need.

The law of forgiveness is that what we could in no way accomplish, God himself accomplished for us, and he was righteous and just in doing so.  This is the nature of the cross.