OK, why did Eve take the fruit?
She was tempted by Satan.
Could God have stopped Satan?
YES
So why didn't He?
OK, in the beginning, God had this relationship with the humans he had created. Everything was good. But then humans disobeyed him... of their own free will... as they were tempted by Satan. God allowed Satan to do that, He did not stop him. But there was a reason for it. God had it all planned out right from the beginning. OK, He could have this relationship with His creation when His creation did not know what good and evil was and hence were not appreciative of His goodness!
OR... He could sacrifice His son when the time came and have a deeper relationship with man because man would know good and evil, know that God is good and love God more because He is so good. We humans are sinners and we know it. We know we need a saviour.
Two situations:
First scenario: A man does nothing wrong because there is no sin. There is no evil, but because there is no evil, he doesn't know what good is. He has a relationship with God, but does not really know what God is all about.
Second scenario: A man sins, repeatedly! But God forgives him. This man knows good and evil and has chosen good. This man loves God more than the other man because he knows more about who He is.
To summarise, yes, God allowed the whole thing to happen because He wanted a deeper relationship with us humans.