This elegant story is, first and foremost, a dual commentary on human nature and divine character.
Yes, it is a story about Israel's history, although in this case, the primary purpose is not to learn about the past. Rather, it is told so that we--who were, in the eyes of the ancient Israelites, a generation yet unborn and probably unimagined--could know the grace and glory of God. For this purpose, the story names an aspect of what it means that all humans are fallen and broken creatures. And then the story names what it means to have a gracious and faithful Lord.
The story begins, as do so many Old Testament narratives, with a brief historical frame: "From the wilderness of Sin the whole congregation of the Israelites journeyed by stages, as the Lord commanded" (v. 1). For most readers, these introductory framing verses do not register. But they should! What happened at the wilderness of Sin? The people had arrived there immediately following their deliverance by God at the sea (Exodus 14), and because they had no bread, they "complained to Moses and Aaron" because they had no bread (16:2-3). And God responded to their complaints by raining down manna on them (16:13-21). Thus, the introductory verses frame the events of 17:1-7 in the context of "been there, done that." The action that unfolds in the first verses of Exodus 17 mirrors what has already happened to a breathtaking degree.
The people, as they had at Sin, quarrel with Moses, this time demanding, "Give us water to drink" (v. 2). One detail of the story that is worth noting is that the people do not complain directly against the Lord, but only against Moses. But Moses interprets the complaint against himself as a complaint against God. He says, "Why do you quarrel with me? Why do you test the Lord?" v. 2). The text provides the obvious answer: they were dying of thirst. A human body can survive a surprisingly long time without food. But in a correspondingly short time, without water a human body will die. The basis for their complaint is therefore perfectly valid. It is their lack of faith and the way that they turn on Moses--who has just been the "means of grace" through which God had delivered them from slavery and fed them with manna and quails--that is the problem. This lack of faith--or perhaps we could name it hard-heartedness, or stiff-neckedness, or ingratitude, or fear--is the aspect of the human condition that the story names.
Moses responds to the complaint of the people with a complaint of his own, this one directed to God: "What shall I do with this people? They are almost ready to stone me" (v. 4). On Moses' behalf, we can add a few more words, "What shall I do with this people that you gave me--and just remember, I was happy leading sheep rather than these people" (v. 5). The interpreter might do well to notice that several key elements of the psalms of lament are present in this story. First, both the people and Moses are in desperate situations of crisis. Both face life-and-death situations; the people think they may die of hunger, while Moses thinks he may die at the hands of the people. Second, there is the traditional "you-complaint" of the psalms--Moses complains to God and we are told in v. 7 that the people said, "IS the Lord among us or not?" Third, there is the traditional "they-complaint" of the prayers of lament--Moses complains about the people; notice here especially that situations of crisis tend to break down community, or cause community "neighbors" to turn on one another. Fourth, there is the request; the people demand water. And finally, there is God's response. God graciously and faithfully responds not to the people's characteristic lack of faith, but to their characteristic human needs. Because God is faithful, God responds out of grace and love.
Moreover, God does so in a manner that provides not simply for the physical need, but in a way that restores the community! Previously, working through Moses, God had caused bread (which normally grows out of the ground) to rain down from heaven. Here, working through Moses, God causes water, which often rains down from heaven) to spring forth from the earth. By working through Moses, the community is restored even as the people's bodily needs are met.
When one reads this little story against the backdrop of the psalms of lament and also against the bigger picture of human nature, one sees that the story does not simply rehearse an episode from Israel's past, but bears witness to the characteristic nature of life and of relationship with God. It is not the people of Israel who were stiff necked, hard hearted, and characteristically lacking in faith. It is all of us. It is not just the people of Israel whose community was threatened by their characteristic infidelity. It is true of our communities, too. It is not merely the ancient Israelites who complained against God. We do so also--and, in fact, the psalms of lament not only give us permission to take such complaining prayers on our lips, they even go so far as to authorize such complaining prayers as a proper dimension of faith. To borrow a phrase from Psalm 51, this story, along with the psalms of lament, "open our lips that our mouths may complain to God."
Above all, this story bears witness to the faithfulness and graciousness of God. The entire Book of Exodus is about the faithfulness of God. This is the message of Exodus, from the report in 2:23-25, that God heard the people's groaning in Egypt and remembered the covenant with Abraham, Isaac, and Jacob, to the creedal hymn that is sung in Exod 34:6: "The Lord, a God merciful and gracious, slow to anger, and abounding in steadfast love and faithfulness."