In Bamidbar 20:2-4, the nation is depicted three different ways: once as an edah (a united group), once as ha’am (the nation, though less united than an edah), and once as kehal Hashem, the congregation of G-d.
One of the main issues G-d raises against Moshe and Aharon in the aftermath of the Mei Merivah story is “Since you did not have faith in Me, to sanctify Me to the people...” In other words, there needed to have been a kiddush Hashem name from which the people would see and understand that G-d is here; that He is the One Who brought forth water from the well; and that Moshe and Aharon are his messengers who helped us, the people, learn these important lessons.
Clearly, in Bamidbar Chapter 20, Moshe and Aharon did not do that. They were given three and a half instructions:
1. Take the staff. (Which staff is a subject of debate.)
2. Gather the edah.
3. Speak to the rock before the eyes of the people (so that water comes out on its own).
3.5. If that doesn’t work, you shall bring forth water for the people (in a manner that you know — the viewpoint of Netziv)
In terms of following G-d’s command, they only do the first.
1. He took the staff, “as he had been commanded” (20:9).
2. They gathered the kehal (a different group than the one they had been instructed to gather).
3. They spoke to the people, but it was more critical than inspirational.
3.5. Because nothing happened, Moshe hit the rock to bring forth water.
It is noteworthy that there was a time when Moshe’s hitting the rock was appropriate, in which he did exactly as G-d told him (Shemot 17:1-7). And there was another time when G-d told Moshe to speak to the people, and through his actions, he demonstrated G-d’s power, causing perhaps the greatest expression of faith that the Jewish people had ever experienced until that time: the Splitting of the Sea.
In Shemot 17, the people fight with Moshe, just as they do in Bamidbar 20, in both cases called the am. They similarly complain about being taken out of Egypt to die in the wilderness.
In Shemot, Moshe is told to contend with the am. In Bamidbar, he is instructed to deal with edah — in other words, to ignore the am. Instead, he contends with the kehal.
Another major distinction between Shemot 17 and Bamidbar 20 is that in Shemot, Moshe is instructed to “take your staff,” not an ambiguous staff, “and strike the rock, and water will come out, and the people will drink” — and Moshe did exactly what he was told to do (17:6). In Bamidbar 20, the only confirmation we have of Moshe following orders is in 20:9, after he took the staff, but before anything else happened.
This leads us to Shemot 14, the lead-in to the Splitting of the Sea. As the Egyptian army is pursuing, the people ask Moshe why he took them out of Egypt. Moshe tells the am not to be afraid (other factions were presumably waiting for instruction), and then G-d tells him, “What are you screaming at Me for? Speak to the Israelites and they should move! As for you, lift your staff and spread your hand over the sea and split it” (14:16).
In the remaining verses, whenever the “miracle-working device” is referenced, it is always Moshe’s hand, in verses 21, 26, 27, and 31.
And what is the end result? “The people see the hand of Moshe, and they believed in G-d and in Moshe [as] His servant.”
The formula is: follow what G-d tells you to the letter. Do not make your stick into a magic wand. Make sure the people see your hand as an extension of the power of the Almighty.
And this is in fact the problem in Bamidbar 20. Look at verse 11, where Moshe “removes his hand,” (according to Kli Yakar), then uses his staff to bring about a miracle — one which nobody attributes to G-d.
What should follow is a declaration of the faith of the people, as we see in Shemot 14:31. Instead, Moshe and Aharon declare to the people “Will we bring forth water for you from this rock?” instead of “will G-d bring forth water for you from this rock?”
The critique they gave when they were told to speak comes to haunt them. They not only spoke inappropriately, but completely left G-d out of the picture.
Our job is to remember to invoke the name of G-d’s at every opportunity. Perhaps in that merit, we, too, will merit to see a return of all of Israel to the Promised Land.