Why did God create the Tree of Knowledge?

Why did God create the Tree of Knowledge?

The tree of knowledge. God created the tree of knowledge and placed it in the garden of Eden. That wasn’t the problem. The problem was...
The tree of knowledge. God created the tree of knowledge and placed it in the garden of Eden. That wasn’t the problem. The problem was he told adam and Eve not to eat from that tree. Genesis 2:16-17 says that God says to Adam that he must not eat from the tree, if he does he will surely die. Most of us sigh on the fact that why did God keep the tree in the center of the garden and not in any deserted or difficult-to-reach location so that Adam and Eve would not be able to consume the fruit...