The Israelites' tragic attachment to the idol Baal Peor and their sins of immorality brought about a swift and severe divine response. The people engaged in immoral acts with women and participated in idol worship [רד״ק], committing a wide range of sins during this single event [ביאור שטיינזלץ]. These actions severely distanced the nation from God. They were done with the explicit intention of angering Him, reaching a climax with the brazen, public sin committed by Zimri [אלשיך].
In response to this rebellion, a deadly plague broke out among the Israelites, rapidly intensifying and spreading throughout the camp [מצודת ציון, מצודת דוד, רד״ק]. A mild plague had actually begun even before Zimri's public act, but following his blatant sin, the disease struck with terrifying force, threatening to completely destroy the nation [אלשיך].
The devastation left a massive void within the community, claiming the lives of twenty-four thousand people [מאירי, מצודת דוד]. The destruction was particularly devastating for the tribe of Simeon, which lost approximately half of its men. This massive loss of life was later evident in the national census and was directly linked to the prominent involvement of the tribe's own leader in the sin [אבן עזרא].