Why would God build a fence or put the tree elsewhere? He had it there for a purpose. Obviously, God knew they would eat the fruit, but nevertheless, He gave them clear instructions not to. They didn't have to eat the fruit. God had given them a beautiful home with everything they needed. He loved and interacted with them daily..They made the choice to listen to the lies of the serpent and ignore the words of God. They betrayed the loving relationship with God and broke trust.
The tree was there to give them a choice. A very simple test of their loyalty. They chose to trust lies and their own perceptions over the wisdom, goodness, and love of God.
Except that the serpent didn’t lie.
God stated and told Adam that if he was to eat the fruit, he would die then and there on that day (Genesis 2:16-17).
“Genesis 2:16-17” said:
16 And the Lord God commanded the man, “You may freely eat of every tree of the garden; 17 but of the tree of the knowledge of good and evil you shall not eat, for in the day that you eat of it you shall die.”
The serpent said to Eve that she wouldn’t die (Genesis 3:4-5). The serpent told her that their eyes would open and they would know the differences between right and wrong, like God.
“Genesis 3:4-5” said:
4 But the serpent said to the woman, “You will not die; 5 for God knows that when you eat of it your eyes will be opened, and you will be like God, knowing good and evil.”
And when Adam and Eve did eat them, their eyes did open:
“Genesis 3:6-7” said:
6 So when the woman saw that the tree was good for food, and that it was a delight to the eyes, and that the tree was to be desired to make one wise, she took of its fruit and ate; and she also gave some to her husband, who was with her, and he ate. 7 Then the eyes of both were opened, and they knew that they were naked; and they sewed fig leaves together and made loincloths for themselves.
And when god found out what they did he cursed them, and expulse them from Eden. But they didn’t die that day. Adam got to live 930 years with Eve.
The serpent told Eve the truth.
But I don’t think God punished them for eating the fruit, but for disobeying his command, and the punishments were that they would toil for a living, and they would know pain and suffering throughout their lives, before they died.
Disobeying God was the sin, not whether they die or not, or whether their eyes would open or not, depending on if they fail or succeed in obeying God.
I don’t think any part of the story in Eden to be real or historical. It is allegory, like one of Jesus’ parables, a teaching mechanism, meant to teach people “moral”, so the Eden narrative have hidden meaning, and it mean, don’t disobey God.
The Flood story isn’t history and it never happened, but here too, are moral messages hidden in, and it is again about sins and punishment.
The Flood narrative was clearly borrowed from the Babylonian Flood myths, and modified for audience of when it was composed in early 1st millennium BCE, hence it wasn’t written by Moses, according to Jewish and Christian traditions, because there was no Moses any more than there were Adam and Eve, or Noah.
In Genesis, Noah replaced the Babylonian Utnapishtim (eg
Epic of Gilgamesh), but Utnapishtim is based on the Old Babylonian Atrahasis (eg
Epic of Atrahasis), and Atrahasis was derived from 3rd millennium BCE Sumerian hero, Ziusudra, the original Flood hero (sources,
Eridu Genesis and the
Death of Gilgames).
In the Iron Age kingdoms of Israel and Judah and the Bronze Age Canaan, the people living in that regions and in their respective times, weren’t living in isolation, they were ignorant of stories from other cultures and other civilisations.
The Levant region, particularly of 2nd millennium Canaan and (1st half of) 1st millennium BCE Israel/Judah were part of the trade routes, where east meets west, north meets south.
And Babylonian texts found their ways to the west, as far back as mid-2nd millennium BCE, because Babylonian tablets on the Epic of Gilgamesh were found in Hattusa (Hittite capital), in Amarna (Egypt, the spiritual capital of the monotheistic Akhenaten), Ugarit (in northwest Syria) and in Megiddo (Canaan). The fact that these tablets were found outside of Babylonia, tell us that the Epic of Gilgamesh (as well as other tales) was very popular in the west, therefore the 1st millennium Hebrew authors would have known the flood stories of Utnapishtim/Atrahasis/Ziusudra.
But back to Eden story. Adam and Eve weren’t real historical characters and Genesis creation story wasn’t historical event.
But the character of God, as tester of man, if God truly knows they would fail the test, then God himself is more like the archetype Trickster.