"And he said to him: I have arranged the seven altars" (ibid.). A parable: this is like a money-changer who cheats with the weights. The master of the marketplace came and noticed him. He said to him: Why do you defraud and lie with the weights? He said to him: I have already sent a gift to the house of my lord. So too with Balaam. The Holy Spirit cried out to him; it said to him: Wicked one, what are you doing? He said to it: "I have arranged these seven altars" (Numbers 23:4). It said to him: "Better a meal of vegetables [where there is love than a fattened ox with hatred in it]" (Proverbs 15:17) — the meal that Israel ate in Egypt over unleavened bread and bitter herbs is better than the bulls that you offer with [hatred]. (As it is said:) "And the LORD put a davar in Balaam's mouth" (Numbers 23:5) — that He twisted his mouth and curbed it, like a man who fixes a nail into a board. Rabbi Eliezer says: an angel was speaking. And Rabbi Joshua says: He curbed it with a hook.
Balaam's Seven Altars and the Cheating Money-Changer
Midrash Tanchuma Buber, Balak 16:4
ויאמר אליו את שבעת המזבחות ערכתי (שם). משל לשולחני שמשקר במשקלות, בא בעל השוק הרגיש בו, א"ל מה אתה מעול ומשקר במשקלות, א"ל כבר שלחתי דורון לבית אדוני, אף כך בלעם קראו רוח הקודש, א"ל רשע מה אתה עושה, א"ל את שבעת המזבחות (הזה) ערכתי, א"ל טוב ארוחת ירק [ואהבה שם משור אבוס ושנאה בו] (משלי טו יז), סעודה שאכלו ישראל במצרים על מצות ומרוים, מפרים שאתה מקריב על ידי [שנאה], (שנאמר) וישם ה' דבר בפי בלעם (במדבר שם ה). שעיקם פיו ופקמו, כאדם שקובע מסמר בלוח, ר' אליעזר אומר מלאך היה מדבר, ור' יהושע אומר היה מחכה.