[(Exodus 37:1:) "And Bezalel made the ark of acacia (shittim) wood."] R. Jeremiah said: (Jeremiah 30:17:) "For I will bring up healing for you, and I will heal you of your wounds, etc." A king of flesh and blood strikes with a scalpel and heals with a plaster, but the Holy One, blessed be He, is not so: with the very thing by which He strikes, He heals. As it is said (Exodus 15:23): "And they came to Marah, [and they could not drink the waters of Marah, for they were bitter (marim)]." R. Levi said: Why "for they were bitter"? The generation was bitter in its deeds. (Exodus 15:25:) "And he cried out to the Lord, [and the Lord showed him a tree ( etz)]." The Holy One, blessed be He, gave him bitter wood, and he put it into the bitter [water], "and the waters became sweet" (ibid.). This is [the meaning of] "and I will heal you of your wounds." So too Israel, when they sinned at Shittim, the Holy One, blessed be He, said to them: By your lives, through that very thing by which you sinned, you shall be healed. "And Bezalel made the ark [of acacia (shittim) wood]."
The Acacia Ark That Healed Israel's Sin at Shittim
Midrash Tanchuma Buber, Vayakhel 9:1
[ויעש בצלאל את הארון עצי שטים]. אמר (ר') ירמיה כי אעלה ארוכה לך וממכותיך ארפאך וגו' (ירמיה ל יז), מלך בשר ודם מכה באיזמל ומרפא ברטיה, אבל הקב"ה אינו כן, בדבר שמכה בו מרפא, שנאמר ויבואו מרתה [ולא יכלו לשתות מים ממרה כי מרים הם] (שמות טו כג), אמר ר' לוי למה כי מרים הם, הדור היה מר במעשיו, ויצעק אל ה' [ויורהו ה' עץ] (שם שם כה), נתן לו הקב"ה עץ מר, ונתן לתוך מר, וימתקו המים (שם), הוי וממכותיך ארפאך, אף ישראל כשחטאו בשטים, אמר להם הקב"ה חייכם במה שחטאתם בו אתם מתרפאים, ויעש בצלאל את הארון [עצי שטים].