Why were Moshe and Aharon punished at the rock even though the people received water?
According to the Midrash and Rashi, speaking to the rock would have sanctified God's Name: the people would have seen that even a rock, unable to hear or speak, obeys His command. Striking it deprived the people of this lesson. In another explanation attributed to Rabbeinu Chananel, the error lay in saying “we will bring forth”: this could suggest that Moshe and Aharon performed the miracle through their own power rather than God.
The source brings differing opinions.
Quote from the source«Ведь, если бы они обратились к скале, и полилась вода, то Имя Всевышнего было бы освящено на глазах у всего народа,»
- Author
- Раши; р. Хананель
- Source
- Fond Nasledia — offline 90 hukat 2018, p. 14