"And the Lord opened the mouth of the ass, and she said unto Balaam, What have I done unto thee, that thou hast smitten me these three times?" (Numbers 22:28)
This tale of a donkey talking has been the object of great ridicule by skeptics. That it is not an allegory or fable, however, but a real historical event, was confirmed in the New Testament by the apostle Peter (2 Peter 2:15-16).
There is no naturalistic explanation for it, of course, but to insist that the event was impossible is simply to deny the power of God. Such miracles of creation are very rare, however, and there must always be a good reason when God intervenes in the laws which normally govern His creation.
One reason in this case, obviously, was to rebuke the prophet Balaam who was resisting God's will simply for monetary gain. Balaam's voice itself would soon also have to be constrained and controlled by God to force him to do God's will (Numbers 22:38; 23:16, 26; 24:13), blessing Israel instead of pronouncing the curse for which he was to have been paid by the Moabites, who were desperately trying to keep God's people out of the Promised Land. The Moabites also needed an unforgettable rebuke. They were apostate descendants of Lot, who had known the true God (Numbers 25:1-3), but they were determined to thwart God's purposes.
There may be another, more universal reason: God is concerned about His animal creation, caring even for every sparrow (Matthew 10:29). The animals have been placed under man's dominion, but they are for his service, his instruction, and his enjoyment--not for his abuse.
Thus Balaam's ass was providentially allowed by God to rebuke not only Balaam but also anyone who would unnecessarily abuse one of His specially and beautifully designed animal subjects. Most Christians need to be much more sensitive to this concern of God. HMM