Why would God who is infinitely good in all ways and all-loving allow suffering in the world? As illustrated vividly in the story of Job in the Bible, why would God allow Satan to do whatever he wants and wreak havoc and pain in the lives of humans for no apparent reason?
Humans brought suffering upon themselves by disobedience.
"To Adam he said, “Because you listened to your wife and ate from the tree about which I commanded you, ‘You must not eat of it,
'Cursed is the ground because of you; through painful toil you will eat of it all the days of your life. It will produce thorns and thistles for you, and you will eat the plants of the field. By the sweat of your brow you will eat your food until you return to the ground, since from it you were taken; for dust you are and to dust you will return” (Genesis 3:17-19).
Satan can only tempt us. It is humans who bring havoc and pain upon themselves and others by falling to temptation.
"And when the devil had ended all the temptation, he departed from him for a season" (Luke 4:13).
We can resist temptation spare ourselves from the pain of sin.
"Submit yourselves therefore to God. Resist the devil, and he will flee from you" (James 4:7).