dybmh
דניאל יוסף בן מאיר הירש
If Adam and Eve started out perfect, then God didn't want them to spiritually grow; how could they? Thus, the prohibition makes sense, right?In the story of Adam and Eve, God forbids them to eat from the tree of the knowledge of good and evil. It seems to imply that God did not want them to know good from evil. Why would that be? And does that strike you as not wanting them to spiritually grow?
OTOH, if they were flawed, and God wanted them to spiritually grow, accomplishing that would take extra-special care. That would involve showing them that they were flawed, and setting them up to break the law. But, unless the plan was executed in a very specific manner, a person would naturally doubt God's intention for all future laws as well. And if that happened a person would not spiritually grow, instead they would spiritually diminish.
So, we don't really know God's intention, because we don't really know if Adam and Eve were perfect or flawed. And maybe that's why the question you've asked is so difficult to answer.
I tend to think eating from the tree was required, and was God's intention else why was the tree planted in the first place.
This opinion ( that God hoped they would eat the forbidden fruit ) is shared by Rabbi Manis Friedman, but for completely different reasons. His interpretation of the Adam and Eve story is somewhat famous. You can find it on youtube. perhaps his approach will be satisfying?