I would say it had to do with the parable of the lost son. Adam and Eve were interested in leaving the tree of life (aka Jesus) and going out on their own.
So why were there talking serpents and trees to create chaos in this world. I have no idea, but it was planned. We know that bc God knows everything. But even though he knows everything it doesn't mean he likes it. Accordingly the parable of the wheat, where both the weeds and the harvest must grow together show God's rationale for allowing the wicked in the world.
In my opinion eating from the tree of knowledge was right at the time where Satan "fell from heaven" with his fallen angels. It was also the fall of man. In fact it's what started this war.
Genesis 4.
The Descendants of Cain
17And Cain knew his wife; and she conceived, and bare Enoch: and he builded a city, and called the name of the city, after the name of his son, Enoch.
18And unto Enoch was born Irad: and Irad begat Mehujael: and Mehujael begat Methusael: and Methusael begat Lamech.
19And Lamech took unto him two wives: the name of the one
was Adah, and the name of the other Zillah.
20And Adah bare Jabal: he was the father of such as dwell in tents, and
of such as have cattle.
21And his brother's name
was Jubal: he was the father of all such as handle the harp and organ.
22And Zillah, she also bare Tubalcain, an instructer of every artificer in brass and iron: and the sister of Tubalcain
was Naamah.
There is no mention of a father for Cain why is that? Could it be that Adam was not Cain's father? Could someone else been his father? Was there anyone else in the garden that God forgot to mention? I will let you answer those questions.
Genesis 5.
1This
is the book of the generations of Adam. In the day that God created man, in the likeness of God made he him;
2Male and female created he them; and blessed them, and called their name Adam, in the day when they were created.
3And Adam lived an hundred and thirty years, and begat
a son in his own likeness, after his image; and called his name Seth:
4And the days of Adam after he had begotten Seth were eight hundred years: and he begat sons and daughters:
5And all the days that Adam lived were nine hundred and thirty years: and he died.
6And Seth lived an hundred and five years, and begat Enos:
7And Seth lived after he begat Enos eight hundred and seven years, and begat sons and daughters:
8And all the days of Seth were nine hundred and twelve years: and he died.
9And Enos lived ninety years, and begat Cainan:
10And Enos lived after he begat Cainan eight hundred and fifteen years, and begat sons and daughters:
11And all the days of Enos were nine hundred and five years: and he died.
12And Cainan lived seventy years, and begat Mahalaleel:
13And Cainan lived after he begat Mahalaleel eight hundred and forty years, and begat sons and daughters:
14And all the days of Cainan were nine hundred and ten years: and he died.
15And Mahalaleel lived sixty and five years, and begat Jared:
16And Mahalaleel lived after he begat Jared eight hundred and thirty years, and begat sons and daughters:
17And all the days of Mahalaleel were eight hundred ninety and five years: and he died.
Notice neither Able or Cain are in Adams line. Able would not be because he was killed before he had any children so he had no seed line to follow