The answer from God’s word:
There are some who, although they believe in Almighty God, have no understanding at all of God’s almightiness. They are constantly at a loss, thinking: “God is almighty, He has the authority and can dominate over all, so why did He still create Satan and allow it to corrupt mankind for six thousand years? Why allow it to turn the world into a miasma of chaos and confusion? Why not destroy it? Would mankind not be fine if Satan were destroyed?” Can you now explain this question? This involves the vision. … What kind of people are those who have been born in the last days? They are those who have been through the corruption of Satan for several thousand years, who had been corrupted to a depth whereby they no longer look human, who have finally been through the judgment, chastisement and disclosure of the word of God, who have been conquered and who have then attained the truth from within God’s words; they are those who have been sincerely convinced by God, who have reached an understanding of God, who can obey God absolutely and satisfy His will. The end of God’s management plan is to obtain a group of people like this. You tell Me, is it those who haven’t been through Satan’s corruption who can satisfy God’s will? Or is it those who will be saved in the end who can satisfy God’s will? Those of mankind that will be obtained through the entire management plan are a group who can understand God’s will, who attain the truth from God, who possess the life and the human likeness which God requires. When man was first created, they merely looked human and had life. But they did not have within them the human likeness which God required or hoped for them to reach. The group of people who will be gotten in the end are those who will remain in the end, and that group is also those whom God requires, whom He loves and whom He is pleased with. Within the several-thousand-year management plan, these people have obtained more, which has come of God’s watering and has been provided for man by means of His war with Satan. The people in this group are better than those whom God created in the very beginning; even though they have been through corruption, this is inevitable, and it is a matter that falls within the scope of God’s management plan that amply reveals His almightiness and wisdom, revealing also that all that God has arranged, planned and achieved is the greatest.
from “Only by Knowing God’s Almightiness Can You Have a True Belief” in Records of Christ’s Talks
My entire management plan, which spans six thousand years, consists of three phases, or three ages: first, the Age of Law; second, the Age of Grace (which is also the Age of Redemption); and finally, the Age of Kingdom. My work in these three ages differs according to the nature of each age, but at each stage it accords with man’s needs—or rather, it varies according to the tricks that Satan employs in My war against it. The purpose of My work is to defeat Satan, to make manifest My wisdom and omnipotence, to expose all Satan’s tricks and thereby to save all of humanity, which lives under its domain. It is to show My wisdom and omnipotence while at the same time revealing the hideousness of Satan. Moreover, it is to teach My creations to discriminate between good and evil, to recognize that I am the Ruler of all things, to see clearly that Satan is humanity’s foe, the lowest of the low, the evil one, and to make the difference between good and evil, truth and falsehood, holiness and filth, greatness and baseness, as clear as day. This way, ignorant humanity may bear witness to Me that it is not I who corrupt humanity, and only I—the Creator—can save humanity, can bestow upon them things for enjoyment; and they may come to know that I am the Ruler of all things and Satan is merely one of My creations, which later turned against Me.
from “The Truth Concerning the Work in the Age of Redemption” in The Word Appears in the Flesh
Now you should notice that God does not eliminate Satan right away, so that man is able to see how Satan has corrupted people, and how God has saved people. Only after man is able to see the extent of Satan’s corruption of man, how Satan’s list of crimes reaches the heavens does God ultimately eliminate Satan, so that people can see that therein is God’s righteousness and His disposition. Everything that God does is righteous. Though you are unable to discover it, you should not make judgment as you please. If it appears to you as irrational, or if you have a conception about it, and then say God is not righteous, this is the most unreasonable.
from “How to Understand the Righteous Disposition of God” in Records of Christ’s Talks