God created man and woman in his image and gave them free will. They needed to have the possibility to exercise their free will. If everything had been permitted, how could they have exercised their free will? There must be a rule in order to exercise your freedom to choose. God didn’t want to force them to love him. Just as you can’t force love! Love, like happiness, is a choice. Freedom is crucial to the validity of a marriage.
Also, it is possible God wanted to give them this fruit -- the capacity of judging out of love, just not yet. In order for them to be able to judge as lovingly as God does, they needed to mature in the Holy Spirit. They just weren't ready for it yet. They lacked trust in God's goodness and grace. They didn't trust that He would give them what they needed, when they needed it.
What is this fruit they ate? It is the fruit from the tree of knowledge. Why wouldn’t God allow them to have knowledge? The devil tells them God wants to keep power over them! No, God wants to give us knowledge, but measured out little by little, as we are growing into the Spirit, growing into Love. Georgette Blaquière, Dare Live Love
Our God is a personal God. He calls each of us to a personal encounter with Him and awaits our free response.
"God speaks with mankind, proposing a way of life and awaiting a free response.... Calling is basic to our very identity as human persons. The fullness of human flourishing is not possible by the use only of our own physical, intellectual, psychic, and emotional resources. We can only fully realize our humanity by responding to God's calls, - subbtle and mysterious, to be sure, yet also real and constant all during our live." Fr. Jacques Philippe, Called to Life