God used this question to emphasize his claim that he should have compassion on Nineveh. AT: "I certainly should have compassion for Nineveh, that important city ... cattle." (See: [[rc://en/ta/man/translate/figs-rquestion]])
The author is pointing out the depth of Nineveh's repentance to the extent that Yahweh takes note of the beasts' participation in the act of repentance. (See: [[rc://en/ta/man/translate/writing-background]])