The episode of mei meriva in our parsha occurred right after the death of Miriam. It was in her zechus that there was a well in the desert; with her death, the well vanished. The thirst of the people returned, but again, it was not just a thirst for water, but a thirst for Torah as well. However, this time around Moshe and Aharon were in aveilus for their sister. They could not learn torah or teach Klal Yisrael! “Lu gavan’u b’gva acheinu lifnei Hashem,” the people complained – had we died earlier, it would at least have been “lifnei Hashem,” enveloped by ruchniyus; now, we have nothing.
The Midrash says the sin of Moshe and Ahraon was not learning even one perek or one halacha to satisfy their needs. Explains the Hafla’ah, they could have learned perek “eilu megalchin; they could have learned a din in hilchos aveilus. There is never a need or an excuse to completely abandon learning.
The Chasam Sofer (al haTorah) adds his own two cents to this idea. Why in the earlier episode of thirst in Parshas Beshalach was Moshe commanded to hit the rock but this time he was told to speak to it? There are different ways to combat the yetzer ha’ra. One way is the brute force method – crush it into oblivion. That method is symbolized by the hitting of the rock that took place shortly after yetzi’as Mitzrayim. Forty years later a more mature Bnei Yisrael was ready to appreciate another approach to combating the yetzer – “mashcheyhu l’beis ha’medrash,” redirecting its energy to a positive goal. Moshe was supposed to engage in talmud torah to demonstrate that the stubborn rock could be harnessed for good as well.