great question.
i found it to be explained in the old testament through the sanctuary. It was given to explain what is happening in heaven and point forward to the coming messiah.
Heb 8:5 Who serve unto the example and shadow of heavenly things, as Moses was admonished of God when he was about to make the tabernacle: for, See, saith he, that thou make all things according to the pattern shewed to thee in the mount.
When we sin we are meant to die. Rom_6:23 For the wages of sin is death; Heb 9:22 And almost all things are by the law purged with blood; and without shedding of blood is no remission.
So people were asked to bring an innocent Lamb or animal to the outer court and kill it, their sins were placed on it and it died for them.
The blood was taken into the sanctuary by the priest and placed on the veil. The blood (your sins) would remain there before the mercy set until the cleansing of the sanctuary (the day of atonement, Lev 16).
It all points to Jesus.
He is our lamb, sin bearer. He is the priest so that when the day of atonement (our judgement) comes we have an advocate.
Rev 14:6 And I saw another angel fly in the midst of heaven, having the everlasting gospel to preach unto them that dwell on the earth, and to every nation, and kindred, and tongue, and people,
Jesus's work didn't finish at the cross,
Heb 9:24 For Christ is not entered into the holy places made with hands, which are the figures of the true; but into heaven itself, now to appear in the presence of God for us:
Heb 9:25 Nor yet that he should offer himself often, as the high priest entereth into the holy place every year with blood of others;
Heb 9:26 For then must he often have suffered since the foundation of the world: but now once in the end of the world hath he appeared to put away sin by the sacrifice of himself.
Heb 9:27 And as it is appointed unto men once to die, but after this the judgment:
Heb 9:28 So Christ was once offered to bear the sins of many; and unto them that look for him shall he appear the second time without sin unto salvation.