The Bible tells us that God sometimes sends suffering to encourage us to go in the right direction in life:
Now no chastening seems to be joyful for the present, but painful; nevertheless, afterward it yields the peaceable fruit of righteousness to those who have been trained by it.
Hebrews 12 v 11
Solomon, the wise king of Israel, gave a prayer at the dedication of the temple he had built. This is part of that prayer:
When the heavens are shut up and there is no rain because they have sinned against You, when they pray toward this place and confess Your name, and turn from their sin because You afflict them, then hear in heaven, and forgive the sin of Your servants, Your people Israel, that You may teach them the good way in which they should walk; and send rain on Your land which You have given to Your people as an inheritance.
2 Chronicles 6 v 26 and 27
From this we can see that Solomon is suggesting that natural disasters such as drought can be sent to make people stop and think about how they are living. God brings suffering on people for their own good.
The Bible makes it plain that our Creator gives us the choice of whether to obey Him or not.
The position was made plain to the early Israelites:
...I have set before you life and death, blessing and cursing; therefore choose life, that both you and your descendants may live; that you may love the LORD your God, that you may obey His voice.
Deuteronomy 30 v 19 and 20
They could either love and obey God and have the hope of life, or disobey and have no hope of life.
The writer of one of the Psalms says:
I have chosen the way of truth; I have set my heart on your laws. I hold fast to your statutes, O LORD
Psalm 119 v 30 and 31
The book of Proverbs tells us that those who ignore God are free to choose to do so:
Because they hated knowledge And did not choose the fear of the LORD, They would have none of my counsel.
Proverbs 1 v 29 and 30