(Numbers 22:32:) "And the angel of the LORD said to him," etc. (ibid., ibid., verse 32). Was it for the affront of the she-ass that the angel came to seek satisfaction at his hand? He said to him: If, for the she-ass, which has no merit of its own and no merit of ancestors, I was commanded to demand satisfaction for its affront from your hand, then for an entire nation that you come to uproot, how much more so!
Why the Angel Avenged Balaam's Donkey on the Road
Midrash Tanchuma Buber, Balak 14:3
ויאמר אליו מלאך ה' וגו' (שם שם לב). עלבון של אתון בא המלאך לבקש מידו, אמר לו ומה האתון שאין לה זכות, ולא זכות אבות, נצטויתי לתבוע עלבונה מידך, אומה שלימה שאתה בא לעקור על אחת כמה וכמה.