"And they took what Micah had made" (Judges 18:27). This is what Scripture says: "To You, O Lord, belongs righteousness, and to us shame of face" (Daniel 9:7). Rabbi Yehudah bar Ilai said: Idolatry crossed the sea together with Israel, and the sea split before them - this is what is meant by "To You, O Lord, belongs righteousness." Rabbi Yudan said: It is written, "And the house of Joseph, they too went up to Bethel, and the LORD was with them" (Judges 1:22) - this is "To You, O Lord, belongs righteousness." Rabbi Simon said: "They took what Micah had made" - an image - "and the priest who was his" - a pagan priest - "and they came to Laish" (Judges 18:27): they practiced idolatry and it prospered in their hands - this is "To You, O Lord, belongs righteousness." Rabbi Shmuel bar Nachmani said: You find that on the day the manna came down for Israel, on that very day they practiced idolatry; and not only that, but they took from it and offered it to idolatry, as it is said, "And My bread which I gave you" (Ezekiel 16:19), and so on. "And it came to pass" - what is "and it came to pass"? Rabbi Yudan said it is like "And it came to pass on the next day" (Exodus 18:13). And even so, You did not withhold the manna from their mouths - this is "To You, O Lord, belongs righteousness."
To You the LORD Belongs Righteousness Even at the Sea
Yalkut Shimoni on Nach 74:1
והמה לקחו את אשר עשה מיכה. זהו שאמר הכתוב לך ה' הצדקה ולנו בושת הפנים. א"ר יהודה בר אלעאי ע"ז עברה עם ישראל בים והים נקרע לפניהם הוי אומר לך ה' הצדקה. א"ר יודן כתיב ויעלו בית יוסף גם הם בית אל וה' עמם הוי לך ה' הצדקה. א"ר סימון המה לקחו את אשר עשה מיכה צולמנא ואת הכהן אשר היה לו כומרא ויבואו אל לכיש עבדין ע"ז והיא מצלחא בידיהון הוי אומר לך ה' הצדקה. א"ר שמואל בר נחמני אתה מוצא ביום שירד המן לישראל בו ביום עבדו עבודה זרה ולא עוד אלא שנטלו ממנו והקריבו לעבודה זרה שנאמר ולחמי אשר נתתי לך וגו' [ויהי]. מהו ויהי אמר רבי יודן כד"א (יט) ויהי למחר. ואעפ"כ ומנך לא מנעת מפיהם הוי לך ה' הצדקה: