Jonah was remembered as the prophet sent to Nineveh, whose preaching brought the people of that foreign city to repentance. Matthew also explicitly connects Jonah's time in the great fish with the Son of Man's time in the heart of the earth. The Queen of the South refers to the queen who came from a distant land to hear Solomon's wisdom, traditionally identified with the Queen of Sheba.
Both examples involve outsiders responding to what God had provided. Nineveh responded to Jonah's preaching, and the queen undertook a long journey to hear Solomon. Jesus contrasts those responses with people who were witnessing His ministry yet continued to demand additional proof.