God is love, but God desires to be loved in return. To love demands freedom; freedom, however, always demands a risk of abusing it! In other words with respect to freedom Adam and Eve could have either used the freedom to glorify and praise God or to abuse their freedom and allow sin to enter into the world.
The only prohibition that God imposed on Adam and Eve was to avoid eating the fruit in the middle of the Garden, the fruit from the tree of knowledge; if done, they would die! The life of man and woman on earth is a constant testing ground to either obey God or reject God’s command. This goes back to the Garden of Eden with Adam and Eve.