God Specifically told Adam and Eve not to eat from the tree of knowledge, but God knew they would anyway because he knows everything, so why would he put that tree there if he told them they could not eat from it and know that they would? Why? Too give them a choice, if God did not plant that tree, Adam and eve would have never sinned, and we would be perfect. We would get to choose because we would always do the right thing. Everything happens for a reason, and that’s what I think God’s reason was for created that tree.
{Genesis 2: 16-17 And the Lord God commanded the man, “You are free to eat from any tree in the garden; but you must not eat from the tree of the knowledge of good and evil, for when you eat from it you will certainly die.”}