Throughout the Exodus, Moshe, who had been a leader - an adoptive son if you will - to Pharaoh, had performed tremendous miracles. He touches a staff to the shores of the red Sea, and the waters part. He then touches it again, and it swallows Pharaoh's army. He goes up to a mountain and communes with YHWH and comes down with the tablets and the abundant commandments. Now, if you're an Israelite back then, do you believe this is because of who Moshe is, or who YHWH (an existence that frightens you) is?
Now, the first time Moses brings water from the rock, Exodus 17, he is upset that the people are challenging YHWH.
Exodus 17: 1 The whole community of the people of Isra'el left the Seen Desert, traveling in stages, as ADONAI had ordered, and camped at Refidim; but there was no water for the people to drink. 2 The people quarreled with Moshe, demanding, "Give us water to drink!" But Moshe replied, "Why pick a fight with me? Why are you testing ADONAI?" 3 However, the people were thirsty for water there and grumbled against Moshe, "For what did you bring us up from Egypt? To kill us, our children and our livestock with thirst?" 4 Moshe cried out to ADONAI, "What am I to do with these people? They're ready to stone me!"
5 ADONAI answered Moshe, "Go on ahead of the people, and bring with you the leaders of Isra'el. Take your staff in your hand, the one you used to strike the river; and go. 6 I will stand in front of you there on the rock in Horev. You are to strike the rock, and water will come out of it, so the people can drink." Moshe did this in the sight of the leaders of Isra'el. 7 The place was named Massah [testing] and M'rivah [quarreling] because of the quarreling of the people of Isra'el and because they tested ADONAI by asking, "Is ADONAI with us or not?" (CJB)
But, after performing these miracles, actually the people were still not sure. They continued to grumble, and were forced to go 40 years instead of 11 days, in the desert because of their doubts.
There was one way for YHWH to make sure the people knew He was the one who made the miracles possible. If when they are very thirsty, Moshe just talks to the rock (i.e. prays for YHWH to bring forth water from the rock), the people would put their trust in YHWH, and know He is watching over them. So, He tells Moshe to do just that. Don't touch the rock as he had done before, but this time, just speak to the rock.
When the next time came that the people were exceedingly thirsty, what Moses did was much different. In grief over the death of his sister, Miriam, in Numbers 20, we read:
Numbers 20:2 Because the community had no water, they assembled themselves against Moshe and Aharon. 3 The people quarreled with Moshe and said, "We wish we had died when our brothers died before ADONAI. 4 Why did you bring ADONAI's community into this desert? To die there, we and our livestock? 5 Why did you make us leave Egypt? To bring us to this terrible place without seed, figs, grapevines, pomegranates or even water to drink?" 6 Moshe and Aharon left the assembly, went to the entrance of the tent of meeting and fell on their faces; and the glory of ADONAI appeared to them. 7 ADONAI said to Moshe, 8 "Take the staff, assemble the community, you and Aharon your brother; and before their eyes, tell the rock to produce its water. You will bring them water out of the rock and thus enable the community and their livestock to drink." 9 Moshe took the staff from the presence of ADONAI, as he had ordered him. 10 But after Moshe and Aharon had assembled the community in front of the rock, he said to them, "Listen here, you rebels! Are we supposed to bring you water from this rock?" 11 Then Moshe raised his hand and hit the rock twice with his staff. Water flowed out in abundance, and the community and their livestock drank.
Notice verse 10 - "Listen here, you rebels! Are we supposed to bring you water from this rock?" What's this WE business? The water pours out...Now based on what Moshe has just done and said, who do the people believe brought the water from the rock? YHWH or Moses? How can they tell? Do they put their trust, then, in YHWH or in man?
That is the dilemma YHWH now has to deal with - If the people are led into the Promised Land, will they give their allegiance to Him, or to Moshe? There is no other choice but to make sure the people put their faith in YHWH. So in the next verse, He takes the matter into His hands.
Numbers 20:12 But ADONAI said to Moshe and Aharon, "Because you did not trust in me, so as to cause me to be regarded as holy by the people of Isra'el, you will not bring this community into the land I have given them." 13 This is M'rivah Spring [Disputation Spring], where the people of Isra'el disputed with ADONAI, and he was caused to be regarded as holy by them.
And there you see in verse 12 the reason Moshe (and Aharon) did not get to cross into the Promised Land! When Moshe exclaimed "What are WE to do?" and struck the rock to bring forth water, he brought glory to himself instead of to ADONAI. The opportunity was for Moshe to show the people that it was ADONAI who was leading them and taking care of them, but he took the glory upon himself.
This would happen again with the Levitical priests when the people scattered because of the legalism, because they had put too much trust in man and not enough in YHWH. And so when the priests got too haughty, and too legalistic, and did not feed the flock, YHWH took matters into His own hand and came down, dwelling in Spirit inside the body of His only begotten Son, Yeshua.
Notice the biggest difference in demeanor between Yeshua and the others - Moses and the priests - who came before Him was His humility versus their pride! Also notice when they finally were led by Joshua to the banks of the Jordan; note who went first and why:
Joshua 3:1 Y'hoshua got up early in the morning, and they left Sheetim and came to the Yarden, he with all the people of Isra'el; they camped there before crossing. 2 After three days, the officials circulated through the camp 3 and gave the people these orders: "When you see the ark for the covenant of ADONAI your God and the cohanim, who are L'vi'im, carrying it, you are to leave your position and follow it. 4 But keep a distance between yourelves and it of about a thousand yards - don't come any closer, so that you will understand which way to go, because you haven't gone this way before." 5 Y'hoshua said to the people, "Consecrate yourselves, because tomorrow ADONAI is going to work wonders among you."
6 Then Y'hoshua said to the cohanim, "Take the ark for the covenant, and go on ahead of the people." They took the ark for the covenant and went ahead of the people. 7 ADONAI said to Y'hoshua, "Starting today, I will make you great in full view of all Isra'el; so that they will know that just as I was with Moshe, so I will be with you. 8 Now you are to order the cohanim carrying the ark for the covenant as follows: 'When you come to the edge of the Yarden River, you are to stop in the Yarden itself.'" 9 Y'hoshua said to the people of Isra'el, "Come here, and listen to the words of ADONAI your God."
10 Then Y'hoshua said, "Here is how you will know that the living God is here with you and that, without fail, he will drive out from before you the Kena'ani, the Hitti, the Hivi, the P'rizi, the Girgashi, the Emori and the Y'vusi: 11 the ark for the covenant of the Lord of all the earth is going on ahead of you across the Yarden. 12 Now choose yourselves twelve men out of the tribes of Isra'el, one man for each tribe. 13 As soon as the cohanim carrying the ark of ADONAI, the Lord of all the earth, put the soles of their feet in the water of the Yarden, the water of the Yarden will be cut off upstream and stand piled up like an embankment." 14 So the people left their tents to cross the Yarden, with the cohanim carrying the ark for the covenant ahead of the people.
15 When those carrying the ark had come to the Yarden, and the cohanim carrying the ark had waded into the water (for throughout harvest season the Yarden overflows its banks), 16 the water upstream stood piled up like an embankment for a great distance at Adam, the city next to Tzartan; so that the water flowing downstream toward the Sea of the 'Aravah, the Dead Sea, was completely cut off; and the people crossed over right by Yericho. 17 The cohanim carrying the ark for the covenant of ADONAI stood fast on dry ground in the middle of the Yarden, while all Isra'el crossed on dry ground, until the entire nation had finished crossing the Yarden.
The bottom line was: YHWH wanted it known who had been their true leader from the start!