Genesis 2:8-17
8 Now the LORD God had planted a garden in the east, in Eden; and there he put the man he had formed. 9 And the LORD God made all kinds of trees grow out of the ground—trees that were pleasing to the eye and good for food. In the middle of the garden were the tree of life and the tree of the knowledge of good and evil.
10 A river watering the garden flowed from Eden; from there it was separated into four headwaters. 11 The name of the first is the Pishon; it winds through the entire land of Havilah, where there is gold. 12 (The gold of that land is good; aromatic resin and onyx are also there.) 13 The name of the second river is the Gihon; it winds through the entire land of Cush. 14 The name of the third river is the Tigris; it runs along the east side of Asshur. And the fourth river is the Euphrates.
15 The LORD God took the man and put him in the Garden of Eden to work it and take care of it. 16 And the LORD God commanded the man, "You are free to eat from any tree in the garden; 17 but you must not eat from the tree of the knowledge of good and evil, for when you eat of it you will surely die."
Why did God, if He expected Adam and Eve not to eat the fruit from the tree, did He put it there in the first place? This is a question sceptics and believers have asked since time began. The answer, however is not a hard concept. God put the tree in the garden to give mankind freedom of choice. God made us to love, but He also made us to love him back. But, what kind of love could we have for God if we had no other choice? True love requires a choice. Without the freedom of choice true love is rendered void. The type of love God requries is the type of love we all want, the love that loves Him when we don't have to. If there were no tree in the garden Adam and Eve would have had no choice but to love God. And that is not true love.