God allowed Satan to do what he did because He wanted humans and spirit beings to have the freedom to choose their behavior, also known as “free will.” He didn’t want to create robots that had no choice except to obey Him. God wants intelligent and willing obedience, rather than pre-programmed service to Him. This means we (including Satan and the angels) have a choice in what we do. 
Lucifer (later named Satan) had free will to choose good, but he chose evil. He tempted Eve, who gave the fruit to Adam and then HE sinned too, causing a “chain reaction of sin” that affects all of us!
God’s wisdom permitted Satan’s sin, even though it has resulted in temporary pain, sickness, and death. This permission of evil for a time is providing an everlasting learning experience that will never be forgotten.
God is allowing us to experience the painful effects of what the sin of disobedience brought. However, it’s important to remember God promised a future earthly kingdom, in which everyone will be raised from the sleep of death and given an opportunity to live a righteous, everlasting life without sin.
When everyone is raised from death and begins obeying the kingdom rules, they will gradually receive blessings better than they could ever imagine. Everyone will remember the powerful lesson that choosing sin produces terrible consequences that lead to death. Because they experienced first-hand the damaging effects of sin, we believe most people will choose to live good, righteous lives on a perfect earth.
Revelation (21:4, NLT) says, “He will wipe every tear from their eyes, and there will be no more death or sorrow or crying or pain. All these things are gone forever.”
So, why didn’t God stop Satan from tempting Eve? Because His plan was best for everyone to learn an everlasting lesson: sin and disobedience brings sadness and death, while obedience to God and His rules brings happiness and blessings.

This video is from Christian Questions Podcast. For more information please go to https://christianquestions.com