Although the Gemara says that a person only sins when a spirit of foolishness enters him, nevertheless, one can be foolish without completely losing his power of reasoning; he is a man, with the powers of reason, in whom a spirit of foolishness entered. Sometimes, however, sins remove the power of reason completely. Let us explain:
In All the Earlier Sins They Did Not Lose the Power of Reason
Regarding Bnei Yisrael’s complaint about the Mahn, saying, But now, our life is parched, there is nothing; we have nothing before our eyes but the Mahn, Rashi there explains that they really had nothing against the Mahn, but were looking for a pretext. In other words, it was a sin, and it involved a foolish spirit, but did not represent losing the power of reason. To the contrary; it involved a [mis]use of reason to find a pretext to leave the way of Hashem.
So, too, regarding the spies who brought forth evil speech against the land. It involved their powers of reason – they were afraid to enter the Land because they feared that the land consumes its inhabitants. That was not an unreasonable conclusion, just one lacking trust in Hashem.
Similarly, regarding the dispute of Korach and his assembly. If anything, that involved too much human reason. The human mind strives for honor and greatness. It was twisted reason, and it indeed resulted from a spirit of foolishness. But the power of reason remained intact.
Here, on the other hand, they equated a slave with his owner, as if Mosheh and Hashem were equals who together raised them out of Egypt. Only one who completely lost his power of reason could compare the Master of the Universe, King of kings, and a mere mortal born of a woman.
Similarly, the claim that the Mahn is destined to blow up in their innards is totally bereft of reason, as explained above. After all, they had eaten Mahn day in and day out for thirty-eight years with absolutely no sign of stomach distress. It made no sense whatsoever to say that would suddenly change.
For Losing Their Reason, They Were Punished by Snakebites
It emerges that specifically here, where they lost their power of reason, thus acting like animals, that wild animals were empowered to dominate them and harm them. As a result, it was natural for dogs and donkeys to bite them, rather than being a punishment, for they were like animals.