The congregation did not have water, and the gathered against Moshe and Aharon. The people fought with Moshe, and said: "If only we had died when our brethren died before Hashem. Why did you bring the congregation of Hashem to this desert, to die here, us and our animals. And why did you take us up from Egypt, to bring us to this evil place, not a place of seed, or figs or grapes or pomegranates, and there is no water to drink." (Bamidbar 20:2-5)
The people's complaint at Mei Merivah is bizarre. You would expect a complaint about water to focus on water, but in fact water seems to be just an afterthought tacked onto the end. Much of the complaint is about the agricultural bounty - herds, grain, fruit - which the people feel entitled to. Shouldn't survival and water come before these luxuries? In addition, the people say they prefer death to their current situation. But if they want to die, why complain about lack of water? And finally, they quite explicitly link themselves to Korach's rebellion - both in linking themselves to "our brethren [who] died before Hashem" (compare to 16:16-17, 17:5, 17:11, 17:28), and in describing themselves as "the congregation of Hashem"/"kehal Hashem" (see Korach's initial complaint in 16:3). Why would they hope to get a positive response from Moshe and God, when linking themselves to the most evil rebels?
It is no surprise that Moshe reacts angrily to this arrogant, insincere demand. "Listen now, you rebels, will I bring water out of this rock?" Moshe correctly recognized the complainers to be hostile rebels, not innocent desperate people who just want water to drink.
Or so we think. But God's responses to Moshe, Aharon, and the people are the opposite of what we expect. Throughout Sefer Bamidbar, God considers and executes punishments on the people. Sometimes (like 16:21-22) these punishments appear to be much harsher than what either Moshe or the average modern reader would consider appropriate. And yet, in the Mei Merivah story, the people receives no punishment whatsoever. In fact, the only ones to be punished are Moshe and Aharon! They are the ones we thought had correctly interpreted the people's demands! What is going on?
I think the answer is as follows. Correct me if I've missed something, but I think that never in the Torah are the people punished for complaining when there is a lack of food or water. Only when they demand things like better food (meat), or altered political arrangements, or a return to Egypt, are they punished. Food and water are legitimate needs; a person cannot live without them. God, by taking the people out of Egypt and promising them entry into Canaan, took on a certain responsibility towards them, which included not allowing them to die. If there really was a shortage of food or water, it was God's responsibility to fix that, and there was nothing wrong in pointing it out.
It is true that at Mei Merivah, the people expressed their complaint in a very offensive way. Yet at its core, the complaint was legitimate. Water was missing, and God had to provide it. In general, a leader who gets angry when asked to do their responsibilities is a failed leader. It is no excuse that "the other side started it"; to descend to the level of selfish ungrateful rebels is an abdication of moral responsibility, and is seen as such by "the other side". Moshe and Aharon were representatives of God, so their failures reflected badly on God - and thus were a failure to "sanctify God's name" (20:12). When leaders fail at their job, it can disqualify them from further leadership, which is what happens to Moshe and Aharon in the wake of this episode.
I am not in the habit of giving lessons to other people, but there is a lesson waiting to be said here. There are many times in life when we, or our ideological camps, are disingenuously accused of misdeeds. Perhaps one person in our camp has behaved badly, and outsiders use this example to besmirch the entire camp. We feel justified in responding in kind - fighting anger with anger, or besmirching the enemy camp based on anecdotes just like ours has been besmirched. I think Mei Merivah's lesson is that in general, we must resist these temptations. Such angry responses rarely convince the other side. More often, they tend to decrease the other side's respect for us, and make the distance between us and them wider and harder to bridge. Particularly in the last few years, when US public opinion has crystallized into mutually exclusive echo chambers which cannot talk to one another, we need the patience to ignore the other side's rhetorical lows and respond thoughtfully rather than in anger. This takes a lot of self-control, and fails to satisfy our inner urge for justice. But it is more likely to lead "the people" to "the promised land" than any alternative.
Credit for this post goes to an interminably long Shir Hashirim reading at the local shul for kabbalat shabbat, leading me to think about the parsha instead of following along.