And out of the ground the Lord God made to spring up every tree that is pleasant to the sight and good for food. The tree of life was in the midst of the garden, and the tree of the knowledge of good and evil. (Genesis 2: 9 ESV)
And the Lord God commanded the man, saying, “You may surely eat of every tree of the garden, 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 surely die.” (Genesis 2: 16-17 ESV)
At face value this is a deadly experiment—can these newly created beings obey instructions? If not, Adam and the woman will eliminate themselves—providing a clean slate for another try.
The experimental subjects were conscious, facile with language, aware and able to appreciate each other. They were able to work and maintain their environment. Did they understand death? One must assume so. It would hardly be fair for God to tell them they would surely [unknown concept] if they ate of the fruit.
In other ways the pair was limited. They didn’t have knowledge of good and evil. They saw each other without seeing. Adam at least, appeared to view the other as a pleasing extension of himself rather than a distinct individual (he didn't name Eve until after the fall).
In truth God had not created a literal: if eat fruit—then drop dead experiment. So what was He up to?
Perhaps He wanted beings that were willing to risk death in order to pursue knowledge. An exercise of free will, with a possible ultimate penalty. This is a step that God could not command, but He could create the situation. In a risk free garden this could not happen. In a garden with forbidden fruit it required disobeying God’s command.
Clearly God's command does not always express His intent. When God wanted to test Abraham He commanded him to offer Isaac as a burnt offering on a mountain. God's command was death, but His intent was a test followed by a blessing. Even Jesus, in another garden, questioned God on what was really necessary. Who can claim to know the mind of God?
The woman and Adam decided to not accept their limited existence. They were willing to risk death to gain knowledge.
In the aftermath there was cursing, dust, enmity, pain, servility, hard work, and death. But there was also vision, God-like knowledge, the joy of children, destiny, desire, relationship, and freedom.
I think they made the right choice.