Gen 3:21 Unto Adam also and to his wife did the LORD God make coats of skins, and clothed them.
Mankind had disobeyed God and was worthy of death and yet God made provision for them. This was a type and shadow of God's ultimate provision which was Jesus Christ the lamb of God being sacrificed for our covering so we could enter God's presence again.
God had a plan before we even fell. He lives outside of time and knows and sees all. His Word is the very creative power of God and when He speaks it is regardless of whether it has manifest in this time line.
Rev 13:8 And all that dwell upon the earth shall worship him, whose names are not written in the book of life of the Lamb slain from the foundation of the world.
God had a plan all along and it is woven through the Old Covenant. We are all worthy of punishment. Even today those who reject His grace shall still be judged under the law as He is Holy and sin cannot stand in His presence.- selah.