Know the power of the ban [cherem]. Come and see: from the tribes that were zealous over the immorality of the tribe of Benjamin, the Holy One, blessed be He, said to them: You were zealous over the immorality, yet you were not zealous over the idol of Micah. And because their zeal was not over the idol of Micah, therefore the Benjaminites slew among them a first time and a second time, until they fell before the Ark of the Covenant of the LORD and sought to repent, and the Holy One, blessed be He, was reconciled to them. And they imposed a ban that all Israel should follow them, from the least to the greatest, as it is said, "For the great oath had been taken" (Judges 21:5). Now was it a great oath that all Israel had sworn? Rather, it is to teach you that the ban is the oath: "that whoever did not come up to the LORD at Mizpah, saying, He shall surely be put to death" (Judges 21:5).
Zeal for Immorality but Silence Toward the Idol of Micah
Yalkut Shimoni on Nach 76:2
תדע לך כח החרם בוא וראה מן השבטים שקנאו על הזנות של שבט בנימן, א"ל הקב"ה קנאתם על הזנות ולא קנאתם בפסל מיכה ועל שלא היה קנאתם על פסל מיכה לפיכך הרגו בהם בני בנימין פעם ראשונה ושניה ושלישית עד שנפלו לפני ארון ברית ה' והיו מבקשים תשובה ונתרצה להם הקב"ה והחרימו שיהיו כל ישראל הולכים אחריהם למקטון ועד גדול שנאמר כי השבועה הגדולה היתה וכי שבועה נשבעו כל ישראל אלא להודיעך שהחרם היא השבועה לא עלה אל ה' במצפה לאמר מות יומת: