And still in Genesis Cain and Abel offered sacrifice without God commanding it and men suddenly began to think about God after the birth of Seth's son without God coming onto the scene and instructing man. They simply did it because they wanted to do it.
Genesis 3:21. God used animal skins to cover their nakedness for which they were ashamed and because of the fall.
Those skins came from what we may presume as slaughtered animals.
The dead animal,the sacrifice of those lives,metaphorically and literally covered the sin of Adam and Eve.
Clearly the sacrifices Cain and Abel made in Genesis 4 were purposed . And because they were taught to do so by God.
Because making a sacrifice to cover sins isn't something that otherwise occurs to the mind of men if they are dead in their sins,unconscious as to the full import of their condition that separates them from God.
Which is why we know being dead and separated from God we cannot of our choosing bridge that gap and come alive of our own choice so to understand the things of God.