God had compassion on the citizens of Nineveh.
Similarly, God said to the angels while the Egyptians were drowning in the Red Sea: how can you sing while my creations are drowning. This is a tremendous teaching, that God has mercy over all His creations. Throughout the story, Jonah did not have compassion on the wicked non-Jews and thought that God should not either. But, at the end he gave up this philosophy and conceded to God, that the world should be run with God's universal compassion.