To understand that purpose, let's begin with an example from the book of Job.
"One day the angels came to present themselves before the Lord, and Satan also came with them. The Lord said to Satan, 'Where have you come from?' Satan answered the Lord, 'From roaming through the earth and going back and forth in it.' Then the Lord said to Satan, 'Have you considered my servant Job? There is no one on earth like him; he is blameless and upright, a man who fears God and shuns evil.'
"'Does Job fear God for nothing?' Satan replied. 'Have you not put a hedge around him and his household and everything he has? You have blessed the work of his hands, so that his flocks and herds are spread throughout the land. But stretch out your hand and strike everything he has, and he will surely curse you to your face.' The Lord said to Satan, 'Very well, then, everything he has is in your hands, but on the man himself do not lay a finger'" (Job 1:6-12 Job 1:6-12  Now there was a day when the sons of God came to present themselves before the LORD, and Satan came also among them.
 And the LORD said to Satan, From where come you? Then Satan answered the LORD, and said, From going to and fro in the earth, and from walking up and down in it.
 And the LORD said to Satan, Have you considered my servant Job, that there is none like him in the earth, a perfect and an upright man, one that fears God, and eschews evil?
 Then Satan answered the LORD, and said, Does Job fear God for nothing?
 Have not you made an hedge about him, and about his house, and about all that he has on every side? you have blessed the work of his hands, and his substance is increased in the land.
 But put forth your hand now, and touch all that he has, and he will curse you to your face.
 And the LORD said to Satan, Behold, all that he has is in your power; only on himself put not forth your hand. So Satan went forth from the presence of the LORD.
American King James Version×, New International Version).
God understood Job's heart better than Satan perceived it. Though God granted Satan permission to afflict Job, the devil failed in his attempt to turn this righteous man against God. Nevertheless, the story of Job's suffering under Satan's affliction reveals much about why God sometimes allows us to suffer.
God tests the character of every human being, and that is a major aspect of what happened with Job. Paul wrote, "We are not trying to please men but God, who tests our hearts" (1 Thessalonians 2:4 1 Thessalonians 2:4But as we were allowed of God to be put in trust with the gospel, even so we speak; not as pleasing men, but God, which tries our hearts.
American King James Version×, NIV). Moses explained to the ancient Israelites, "Remember how the Lord your God led you all the way in the desert these forty years, to humble you and to test you in order to know what was in your heart, whether or not you would keep his commands. He humbled you, causing you to hunger [a form of suffering] and then feeding you with manna, which neither you nor your fathers had known, to teach you that man does not live on bread alone but on every word that comes from the mouth of the Lord" (Deuteronomy 8:2-3 Deuteronomy 8:2-3  And you shall remember all the way which the LORD your God led you these forty years in the wilderness, to humble you, and to prove you, to know what was in your heart, whether you would keep his commandments, or no.  And he humbled you, and suffered you to hunger, and fed you with manna, which you knew not, neither did your fathers know; that he might make you know that man does not live by bread only, but by every word that proceeds out of the mouth of the LORD does man live.
American King James Version×, NIV).
God allows mankind to learn—partly by firsthand experience—that the only way of life that will work is the way of life He reveals in His Word, the Bible. That lesson will not be complete until all of humanity has learned that "every word" of God's revealed instructions is vital to our physical, mental and spiritual well-being (Matthew 4:4 Matthew 4:4But he answered and said, It is written, Man shall not live by bread alone, but by every word that proceeds out of the mouth of God.
American King James Version×; Deuteronomy 5:29 Deuteronomy 5:29O that there were such an heart in them, that they would fear me, and keep all my commandments always, that it might be well with them, and with their children for ever!
American King James Version×). No alternative way of life achieves God's purpose or ultimately leads us to happiness.
But how can God get this point across to people who are born into the world with no knowledge or understanding? He could have preprogrammed us to behave only according to harmless predetermined instincts. But then we would be mere automatons, having no choices, no individuality, no character.
Such existence is not what God intends for us. He has created us to become members of His own family—His sons and daughters (2 Corinthians 6:18 2 Corinthians 6:18And will be a Father to you, and you shall be my sons and daughters, said the Lord Almighty.
American King James Version×)—able to bear great responsibilities within His family.
At the beginning of human existence God stated His purpose for us: "Then God said, 'Let Us make man in Our image, according to Our likeness; let them have dominion over the fish of the sea, over the birds of the air, and over the cattle, over all the earth and over every creeping thing that creeps on the earth.' So God created man in His own image; in the image of God He created him; male and female He created them" (Genesis 1:26-27 Genesis 1:26-27  And God said, Let us make man in our image, after our likeness: and let them have dominion over the fish of the sea, and over the fowl of the air, and over the cattle, and over all the earth, and over every creeping thing that creeps on the earth.
 So God created man in his own image, in the image of God created he him; male and female created he them.
American King James Version×).
God created mankind to be like Him, to rule—have dominion—over His creation. To learn to properly exercise such a level of responsibility, man must first learn how to discern right from wrong, good from bad, and the wise from the foolish. Learning real wisdom involves learning how to make wise choices. From the beginning God pointed out the right way, but He allowed human beings to be exposed to and make foolish choices.
God allowed Satan, the epitome of evil, to enter the Garden of Eden and tempt Adam and Eve to depart from God's instructions. They then had to make a choice. They chose to follow Satan rather than God. Satan's tragic delusion of mankind has been the result.
However, when Jesus Christ returns to the earth, He will remove the delusion of Satan. God then will begin, on a grand scale, the process of reversing the damage Satan has done. Eventually none of the devil's influence will remain.
Mankind can then review thousands of years of tragic history and compare it with the blessings of Christ's rule. The Bible reveals that when this occurs the overwhelming majority of humanity will reject Satan's deceptions and enthusiastically embrace every word of God.
God is in control, but He has allowed Satan to dominate humanity for two basic reasons. First, Adam and Eve, our first parents, chose Satan's domination over them. Second, God wants all of humanity to learn important lessons—that "the way of man is not in himself; it is not in man who walks to direct his own steps" (Jeremiah 10:23 Jeremiah 10:23O LORD, I know that the way of man is not in himself: it is not in man that walks to direct his steps.
American King James Version×) and that Satan's way leads to misery and suffering. (To learn more, request or download our free booklet Why Does God Allow Suffering?)