And to what are they compared? To a ship in which one compartment was torn open. They do not say, "One compartment was torn open"; rather, the whole ship was torn open. So it is with Israel, as it is said: "Did not Achan son of Zerah commit a trespass in the devoted thing, and wrath fell upon all the congregation of Israel? And that man did not perish alone in his iniquity" (Joshua 22:20).
The People of Israel Are Similar to a Ship
Tanna DeBei Eliyahu Rabbah 11:25
ולמה הן דומים לספינה שנקרע בה בית א' אין אומרים נקרע בה בית א' אלא כל הספינה נקרעה כלה כך הם ישראל שנאמר (יהושע כ״ב:כ׳) הלא עכן בן זרח מעל מעל בחרם ועל כל עדת ישראל היה קצף והוא איש א' לא גוע בעונו.