“Then said his wife unto him, Dost thou still retain thine integrity? curse God, and die. But he said unto her, Thou speakest as one of the foolish women speaketh. What? shall we receive good at the hand of God, and shall we not receive evil? In all this did not Job sin with his lips.” - Job 2:9-10.
The devil creates troubles in the world so that people will lose their faith and, as Job's wife urged him, would “curse God and die”, which is contrary to the law of God. Of course these wrong steps will drive them deeper into the mire and into the devil's den. Evidently the devil believes that even the most ardent worshippers will turn against God when faced with intense persecution. Job did not do so, and was blessed in the end. This pointedly gives the understanding that God is not the cause of our difficulties.
Troubles came into the world as a result of sin and human beings happen to have been born into them. It is only when people turn to God and remain steadfast in His service He will help them out of their troubles and give them peace. “Then they cry unto the Lord in their trouble, and he bringeth them out of their distresses. He maketh the storm a calm, so that the waves thereof are still'. - Psalm 107:28, 29.