That is the most profound question of all questions. Why didn't God stop Eve from eating the fruit?
This theologians call the problem of theodicy. Why is there evil in the world? If God is absolutely holy, why is there evil in the world? That's essentially that question why didn't he stop it before it started.
First of all, the broad answer is this; because, God allowed her to eat that fruit! God allowed sin to come into the world, so that He could be glorified. Now, God is a God of love, and He could express that love even in the perfection of the Trinity, and He expressed that love to Adam and Eve, when He walked and talked with them before they sin, before she ate, so God could express His love.
But if there had never been a sin, there would never be forgiveness. There would never be mercy. There would never be grace. There would never be compassion. There would never be healing. There would never be restoration. And so, forever and ever, the angels would never be able to worship God for all those aspects of his nature. So; God allows evil, so that He can display grace, and mercy, and compassion, because those also are attributes of God. That can only be put on display, through His response to sin.
There's another reason, and that is that God is holy, and just, and righteous. He would never be able to display ultimately what that means, unless there were sinners to judge. So; whether it is judgment on sin, or whether it is salvation from sin, the fact that sin exists, allows God to display eternally the glory of the full scope of His attributes.
~ John MacArthur, answered this question from a child in the audience at church, listen here