Adam and Eve were expelled from the garden of Eden not because they ate the forbidden fruit of the tree of knowledge of good and evil, but in order to prevent them from eating from the tree of life (both forbidden trees are in Genesis 2:9) which would have made them eternal. Here is the verse “And he said: Behold Adam is become as one of us, knowing good and evil: now, therefore, lest perhaps he put forth his hand, and take also of the tree of life, and eat, and live forever. And the Lord God sent him out of the paradise of pleasure, to till the earth from which he was taken.”
So, he sent Adam out to learn and experience (till the earth) before becoming eternal.