They can cause people to realize their own weakness and their need to rely upon and pray to God, who is able to deliver them. For he commanded and raised the stormy wind, which lifted up the waves of the sea. Then they were glad because they had quiet, and he brought them to their desired haven. Let them thank the Lord for his steadfast love, for his wonderful works to humankind. Let them extol him in the congregation of the people, and praise him in the assembly of the elders.
Storms can serve more than one function.
In the case of Jonah, not only does the storm cause Jonah to reconsider his call to bring God's message to Ninevah, but the events also served to demonstrate God's power to a group of unbelieving sailors, whose reaction was to recognize and worship the one true God. But Jonah set out to flee to Tarshish from the presence of the Lord. But the Lord hurled a great wind upon the sea, and such a mighty storm came upon the sea that the ship threatened to break up. Then the mariners were afraid, and each cried to his god. They threw the cargo that was in the ship into the sea, to lighten it for them.