The word of the LORD came to Jonah the son of Amitai, saying: 2 Arise, go to Nineveh, the great city, and proclaim against it, because their wickedness has come up to [to] me. 3 But Jonah got up to flee to Tarshish, far from the presence of the LORD. And going down to Joppa, he found a ship going to Tarshish, paid the fare, and entered it to go with them to Tarshish, far from the presence of the LORD. Jonah 1-3 New International Version (NASB)

Imagen source
As a Sunday school teacher I really like this biblical story about the life of Jonah, which contains very relevant teachings for both children and adults.
Sometimes it is very difficult for us to understand that God is a very loving and compassionate Father, who still shows his compassion with very bad and wicked people. Certainly, Jonah did not understand that great love of God for the sinful people of Nineveh, Jonah simply, what he wanted, was for God to destroy that city, because they had done many cruelties to the people of Israel.
This seems very similar to us, what God did for us, we did not deserve God's forgiveness, however, He sent his son so that we could repent and return to the arms of the Lord.
God wanted to use Jonah to preach to the people of Nineveh and they would repent for God to forgive them and save them from the judgment He had in store for them. However, Jonah did not understand what God was planning, but acted haughtily to the point of disobeying God and not going to the place that God was indicating.
The Lord had to use various strategies aimed at breaking down Jonah's arrogance and seeking to get him to obey him.
Jonah in the midst of his pride took a ship bound for Tarshish instead of going to Nineveh. Pride darkens the eyes of disobedient men. God had to rage the sea and generate a storm, with which the crew of the ship where Jonah was going, had to throw him into the sea and as if that were not enough, a huge fish swallowed Jonah for three days until vomiting him at the seashore.
If God chooses a man for a mission and he resists, God uses all the necessary mechanisms to make him obey and comply with the mandate. This is what happened with Jonah, God to bring down his pride allowed him to be in the mouth of that fish for three days and make Jonah experience something similar to the torment of Sheol until he decided to obey God and repent of his pride.
We cannot expect God to do to us what He did to Jonah. God wants humble, obedient children who serve Him wholeheartedly.