Like most people who grew up with the story of Adam and Eve, I always assumed the whole point of having the tree of the knowledge of good and evil (often shortened foolishly to The Tree of Knowledge, but I'll just call it The Tree herein) was to test Adam and Eve, to see if they were worthy or something. They failed. Flunked the test. They thus deserved punishment, and doomed us all.
That never made a lot of sense to me. If God cared enough to create us, why would he set us up for failure? If God is a God of love, why was he out to punish us? If God is omniscient (if he really knows it all) why would he need to test us?
Over the years, I've gotten a number of unsatisfactory answers from both Christians ("you'll understand when you get to Heaven" or "God just wanted to test us"-- simply turning my question into a statement, a total non-answer) and from non-Christians ("See? I told you he was rotten" or "He was jealous, just like the snake said!") None of those jived with what I read of God in the Bible or with my experience.
Recently it's all started to make sense, especially as I realized how many of my assumptions and things I'd been taught about the Bible were wrong. It's a matter of viewpoint, of perspective-- if you look at it wrong, it looks like something other than what it is.
I think the plan all along was to teach us about Good and Evil. But we would have learned it directly from God, our Creator, our Lover. God would have taught it gradually, in ways that would have benefited us, as we grew in our understanding, knowledge, wisdom, and even power and glory.
The test had several facets, but not, I believe, the ones we usually attribute it. It was a test for Adam and Eve, but in the sense that they were being given a chance to prove to themselves and all of creation they were worthy of God's favor, worthy to rule. It was a chance to prove themselves wiser than Satan. As we know, they failed.
It was a proof that God gave free will. Despite what Lucifer had done, God was still willing to create and love and trust.
Finally, I used to wonder how God expected Adam and Eve to pass up The Tree. But over time it hit me that the Garden of Eden wasn't a garden in the sense that a child in an El Paso, TX suburb on the edge of the desert thinks of a garden. It wasn't some small thing with just a few trees, or even a few hundred. Eden's garden undoubtedly made the most fabled man-made gardens, such as Versailles, Central Park, Mirabel, Babylon, or Kensington look like the small flower beds in our back yard in El Paso.
I don't know what The Tree looked like, but even if it was amazing, Eden had to be chock full of amazing. We live in a fallen world. As beautiful as things can be now, I have to believe that they pale compared to the plants in Eden. And there's nothing in the Bible to indicate The Tree was far more beautiful or enticing than any other tree or fruit. In fact, it sounds as if Eve didn't notice it that much until Lucifer worked on her a while. "When the woman saw that the fruit of the tree was good for food and pleasing to the eye, and also desirable for gaining wisdom, she took some and ate it." (Gen 3/8)
So, they had a single tree out of thousands, perhaps millions, with a fence (physical or metaphorical) around it. It wasn't a case of having to avoid something that dominated the landscape and their every waking minute. It was a case of having all of a huge thing with one tiny restriction, and refusing to accept even that one restriction. By that act of rebellion they gained what they thought they desired-- what God would surely have given them, anyway-- and lost everything.
Finally, for those still fuming over a loving God dooming us all because of one or two peoples' actions, don't forget that through Christ everything is made new, and that our inheritance is restored. To my great joy, I have come to find that inheritance includes God walking with me, talking with me, loving, teaching, growing, nurturing me as he did Adam and Eve. By rejecting the fruit of The Tree, by accepting the gift of grace, by being filled with his spirit, I have a deep relationship with God, growing every day in the knowledge of good and evil, and so much more.
 Jn 3/35, Mt 28/28-20, Mt 10/8, Acts 1/8
 Jn 17/22
 We are, after all, made in God's image. (Gen 1/26)
 Christ, the new Adam (I Cor 15)
 Blessed are the meek for they shall inherit the earth. (Mt 5/5)