Jonah is mentioned in 2 Kings 14:23-25 as a prophet of the northern kingdom of Israel during the time of the divided kingdom. (After the reign of Solomon, Israel broke up into a northern kingdom of Israel and a southern kingdom of Judah.)
Later, during the reign of King Hoshea of Israel, the northern kingdom was invaded by Assyria and its people (most likely only its upper, educated, and noble classes) deported, which brought the northern kingdom to an end. That story is told in 2 Kings 17, and a thumbnail version in 2 Kings 18:9-12. The king of Assyria at the time was Sennacherib.
At the time of the invasion and captivity of the northern kingdom, Nineveh was the capital city of Assyria, where King Sennacherib resided (see 2 Kings 19:36).
Given that Assyria was the arch-enemy of the kingdom of Israel, of which Jonah was a citizen and prophet, it is only natural that its capital city of Nineveh was seen as an exceedingly evil city.
All of this suggests the answer to why, in the book of Jonah, God sends Jonah to Nineveh, of all possible cities--and why Jonah immediately went in the opposite direction, intending to get as far away from Nineveh as possible (see Jonah 1:1-3).
In the minds of an Israelite of that era, Nineveh represented the most hated and most evil city possible. Therefore the story of Jonah is the story of God telling a prophet of Israel to go prophesy to, and potentially save the souls of, the very people that he most hated and most wanted to see destroyed.
That is the drama of the book of Jonah.
The book of Jonah, then, is a story in the late history of ancient Israel in which God is telling the Israelites that they must be concerned even for their most hated enemies, and bring their message of repentance and salvation to them.
Whether this story literally took place as conservative Christians believe, or whether it was a parable written later and set in the time of Jonah, its message is the same, and the reason for the selection of Nineveh as the target city for Jonah's message of repentance was the same.
God sent Jonah to Nineveh because God wanted Jonah to bring a message of salvation to the capital city of his people's most hated enemies.