Zephaniah says Moab and Ammon are judged for insults and taunts against the LORD’s people. Their pride and magnifying themselves are specifically highlighted (Zephaniah 2:8–10).
In Zephaniah 2:8–10, Yahweh says he has taken notice of Moab and Ammon’s contempt for his people and their self-exalting aggression along the border. Because of this, he announces a firm reversal of fortunes: these nations will end up like Sodom and Gomorrah—ruined land, unusable and permanently desolate. These verses sit within Zephaniah’s series of announcements against surrounding nations in chapter 2, following a call for Judah to seek humility and refuge before coming disaster (2:1–3). The prophet moves from Israel/Judah-focused warnings to the way neighboring peoples will also be brought low.
Zephaniah 2:8–10 presents Yahweh as attentive to how nations treat “my people.” The passage explicitly says he has heard Moab’s reproach and Ammon’s insults, and that their pride showed up in hostile speech and self-exalting behavior “against their border” (verse 8, verse 10). The judgment is not framed as random; it is a response to contempt and aggression.
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with Zephaniah 2:8-10, then read the surrounding section so the answer stays connected to the passage's flow.
8I have heard the reproach of Moab, and the insults of the children of Ammon, with which they have reproached my people, and magnified themselves against their border.
9Therefore as I live, says Yahweh of Hosts, the God of Israel, surely Moab will be as Sodom, and the children of Ammon as Gomorrah, a possession of nettles, and salt pits, and a perpetual desolation. The remnant of my people will plunder them, and the survivors of my nation will inherit them.
10This they will have for their pride, because they have reproached and magnified themselves against the people of Yahweh of Hosts.