How did Chazal "know" that Bilaam committed bestiality with his donkey?
They didn't, but it is a matter of textual interpretation. As mentioned in Avodah Zarah 4b, the words
ההסכן הסכנתי
find a secondary meaning, a double-entendre if you will, of 'warming' by night. They point to the parallel by Avishag haShunamit (though there the warming was non-sexual). As Rashi explains (Bemidbar 22:30):
The she-donkey said to Balaam, "Am I not your she-donkey on which you have ridden since you first started until now? Have I been accustomed to do this to you?" He said, "No." | לוַתֹּ֨אמֶר הָֽאָת֜וֹן אֶל־בִּלְעָ֗ם הֲלוֹא֩ אָֽנֹכִ֨י אֲתֹֽנְךָ֜ אֲשֶׁר־רָכַ֣בְתָּ עָלַ֗י מֵעֽוֹדְךָ֙ עַד־הַיּ֣וֹם הַזֶּ֔ה הַֽהַסְכֵּ֣ן הִסְכַּ֔נְתִּי לַֽעֲשׂ֥וֹת לְךָ֖ כֹּ֑ה וַיֹּ֖אמֶר לֹֽא: | |
Have I become accustomed: Heb. הַהַסְכֵּן הִסְכַּנְתִּי. As the Targum [Onkelos] renders [lit., have I learned to do this?]. Similarly,“Does man learn (יִסְכָּן) for God?” (Job 22:2). Our Rabbis, however, expounded this verse in the Talmud: They [the Moabite dignitaries] said to him, “Why aren’t you riding on a horse?” He [Balaam] said to them, “I sent it out to pasture.” [Immediately, the she-donkey retorted, “Am I not your she-donkey?” He said to her, “Just for bearing burdens.” She retorted, “on which you have ridden.” He said to her, “Only on occasion.” She retorted,“since you first started until now, and not only that but I provide you with riding by day, and with intimacy at night, (interpreting Heb. הַהַסְכֵּן הִסְכַּנְתִּי as”I heated you up,") as is stated in Tractate Avodah Zarah [4b]. | ההסכן הסכנתי: כתרגומו, וכן (איוב כב, ב) הלאל יסכן גבר. ורבותינו דרשו מקרא זה בגמרא אמרו ליה, מאי טעמא לא רכבת אסוסיא. אמר להון ברטיבא שדאי ליה וכו', כדאיתא במסכת עבודה זרה (ד ב): |
It seems possible that they also saw a double-entendre in אֲשֶׁר־רָכַ֣בְתָּ עָלַ֗י. That explains the immediate mechanics. What about the impetus?
I can see three impetiuses.
(A) a global desire to paint bad guys negatively
(B) a local desire to expand upon, and explain, the "embarrassment" of the previous verse, in such manner as to make each subsequent phrase an explanation of the "embarrassment", in increasing order.
(C) that the donkey was executed by the angel, as detailed in another midrash; this execution was for sparing of embarrassment, and Chazal found the other instance of execution of an animal to spare embarrassment.
(A) The global desire to paint bad guys negatively
It is a general trend in midrash to take "bad-guy" Biblical characters who are, on a peshat level, painted in shades of gray, and to paint them as totally dark. We see this for Lavan, for Lot, for Esav, for Pharaoh, and so on.
Similarly, for the heroes and "good guys", even where they act in ways which seem not-so-good, the midrash will paint them and their actions as more clearly defined white-hats. And neutral statements on a peshat level will be certainly taken as accounts of praiseworthy actions.
There may be many reasons for this. (Maharatz Chajes discusses this phenomenon at length, IIRC in Iggeret Bikkoret). The purpose of these midrashim may be homiletical, to provide positive role models and vice versa, a Goofus and Gallant. It could be that Chazal are just always going to pick up on this nuanced language, and will naturally and honestly assume that these will be holding hidden condemnation or tales of good deeds. Context dictates which one, and the overall character of the person is the best context.
(B) a local desire to expand upon the "Embarrassment"
The previous verse (22:29, and Rashi) read:
Balaam said to the she-donkey, "For you have humiliated me; if I had a sword in my hand, I would kill you right now." | כטוַיֹּ֤אמֶר בִּלְעָם֙ לָֽאָת֔וֹן כִּ֥י הִתְעַלַּ֖לְתְּ בִּ֑י ל֤וּ יֶשׁ־חֶ֨רֶב֙ בְּיָדִ֔י כִּ֥י עַתָּ֖ה הֲרַגְתִּֽיךְ: | |
you have humiliated: Heb. הִתְעַלַּלְתָּ. As the Targum [Onkelos] renders it, a term denoting shame and disgrace. | התעללת: כתרגומו לשון גנאי ובזיון: | |
If I had a sword in my hand: This matter made him greatly contemptible in the eyes of the dignitaries. This man was going to kill an entire nation with his mouth, yet for this she-donkey he needed weapons!- [Mid. Tanchuma Balak 9, Num. Rabbah 20:14] | לו יש חרב בידי: גנות גדולה היה לו דבר זה בעיני השרים, זה הולך להרוג אומה שלמה בפיו, ולאתון זו צריך לכלי זיין: |
The word hitalalta is ambiguous, but is understood by Chazal to denote embarrassment, shame, and disgrace. We have an immediate disgrace in the very verse, namely that he did not have the ability to slay the donkey with his own mouth, but would require a weapon.
But the embarrassment and shame, on a peshat level, is that his donkey repeatedly has disregarded his directions! He cannot control his donkey, and so has smote her three times.
But then the embarrassment continues. And the donkey's conversation repeatedly exposes the lowly stature of Bilaam before the Moabite dignitaries, culminating with revelations that he regularly engaged in intimacy with his donkey.
(C) That the donkey was executed by the angel
However, I think a real key to this interpretation is to be found later in the same perek. In pasuk 33:
When the she-donkey saw me, it turned aside these three times. Had she not turned aside before me, now also I would also have killed you and spared her [the she-donkey]." | לגוַתִּרְאַ֨נִי֙ הָֽאָת֔וֹן וַתֵּ֣ט לְפָנַ֔י זֶ֖ה שָׁל֣שׁ רְגָלִ֑ים אוּלַי֙ נָֽטְתָ֣ה מִפָּנַ֔י כִּ֥י עַתָּ֛ה גַּם־אֹֽתְכָ֥ה הָרַ֖גְתִּי וְאוֹתָ֥הּ הֶֽחֱיֵֽיתִי: |
and spared her: But now, since she spoke and rebuked you, and you could not withstand her rebuke, as it is written, “He said, No,” therefore, I have killed her, so that [people] should not say, “This is the one that silenced Balaam with her rebuke, and he could not respond,” for the Omnipresent shows regard for human dignity. Similarly, “you shall kill the woman and the animal [through which the sin was committed]” (Lev. 20:16), and, “you shall kill the animal” (ibid. 20:15) - [Mid. Tanchuma Balak 9, Num. Rabbah 20:14] | ואותה החייתי: ועתה מפני שדברה והוכיחתך ולא יכולת לעמוד בתוכחתה, כמו שכתוב (פסוק ל) ויאמר לא. על כן הרגתיה, שלא יאמרו זו היא שסלקה את בלעם בתוכחתה ולא יכול להשיב, שחס המקום על כבוד הבריות, וכן (ויקרא כ, טו - טז) ואת הבהמה תהרוגו, וכן (שם) והרגת את האשה ואת הבהמה: |
The clear meaning of this midrash is that it is the embarrassment of rebuke for which the donkey here is killed.
However, Vayikra is one of two times an animal is executed. An animal who kills a person is executed, and there are even full court procedures for it, but the reason seems to be that spelled out in Bereishit 9:5, וְאַךְ אֶת-דִּמְכֶם לְנַפְשֹׁתֵיכֶם אֶדְרֹשׁ, מִיַּד כָּל-חַיָּה אֶדְרְשֶׁנּוּ; וּמִיַּד הָאָדָם, מִיַּד אִישׁ אָחִיו--אֶדְרֹשׁ, אֶת-נֶפֶשׁ הָאָדָם.
The other time is the case of bestiality. Now animals are not typically deemed guilty of sin. Why should the animal be executed for sleeping with a human? This is what the midrash (above) is saying, that it is to spare the human embarrassment and preserve their dignity. The animal cannot be walking around and have people point to it and say it was Ploni's girlfriend or Plonit's boyfriend.
Once this connection had been made, it was a very short leap to say that Bilaam's female donkey was executed to spare him for embarrassment in the exactly the same way the other animal in the Torah was executed to spare someone from embarrassment. And this then guided Chazal in all the other interpretations.
a