This psalm unfolds in a clear two-part structure. The first part is a call to worship (vv. 1-7a); the second a prophetic warning (vv. 7b-11).
By virtue of the call to worship, it clearly belongs in the collection of hymns (Psalms 96–98) that predominate in the RCL during the Christmas propers (I–III), and it rings with the same pastoral tones and imagery of thanksgiving that we find in Psalm 100. Two clusters of imperatives summon the people to come, sing, and make a joyful noise (vv. 1-2); come, worship, bow down, and kneel (v. 6); with theological rationales attached to each group of invitations. In the first series of invitations the Lord is named "the rock of our salvation" (v. 1), while its attendant rationales testify to his greatness as God, his sovereign superiority "above all gods," his dominion over "the depths of the earth," "the heights of the mountains," "the sea" and "the dry land." His possession of these is attested by virtue of his having "made" and "formed" them (vv. 3-5). The second verb cluster is supported with the simple assertion that "he is our God," after which the Lord's role as shepherd is inferred by virtue of how "we" are characterized: "We are the people of his pasture, and the sheep of his hand." Such simultaneously pastoral and kingly imagery — which remains ever surprising in such close, even synonymous relation — is prominent throughout the Old Testament, from the Torah, to the prophets, to the Psalms. Indeed, it is so familiar we risk losing sight of its otherworldly, or at least counter-cultural oddity if we take for granted the protective and providential nature of governance.
The latter section of this psalm, however, introduces significant discord; here, the harmonious liturgical encounter between the sovereign Shepherd and the ovine assembly, if you will, is interrupted by a dreadful, painful memory that is reconstituted as a warning. A plaintive, subjunctive cry to the people to "listen to his voice" (v. 7b) is contrasted with their costly and all-too-consistent stubbornness, euphemistically characterized as a hardening of the heart (v. 8a).
The incident or incidents in question concern two such battles of will between Yahweh and Israel during the wilderness sojourn: the first at Meribah (Exod 17:1-7), the second at Massa (Num 20:1-13), both involving the people's complaints regarding a lack of water and both involving water coming forth from a rock when Moses strikes it with his staff. The first instance occurs at Rephidim, before the giving of the law. There Moses renames the place with both designations: Massah and Meribah, for the people had "quarreled and tested" the Lord. The second instance occurs much later, after the law, after the failure of the spies to encourage the people to enter the land, after the death of Miriam, and just prior to the death of Aaron. As similar as this account is to that earlier testing, it is some forty years later, which undoubtedly accounts for the subsequent reference to that interval (v. 10). In other words, even though the earlier incident occurs at a place Moses calls by both names (Meribah and Massah), the latter (at Meribah of Kadesh) serves to surround or "bookend" the entire wilderness period, suggesting that Israel's nature, as a generation, had not been episodically stubborn, but consistently so. That may be hard to reconcile with other texts that show, e.g., Israel giving with grateful and joyful abundance for the construction of the tabernacle (Exod 35:20–36:7), but it does seem to be the viewpoint of the psalm at hand. In other words, the incidents at Massah and Meribah serve as parentheses around the forty years in which Israel, by this account, did nothing but test and complain against the Lord, ultimately meeting with his angry oath that they should die in the wilderness and not enter the promised land (v. 11).
Two points are particularly important. First, the heard-hearted stubbornness of the people is repeatedly characterized as inexplicable: "though they had seen my work" (v. 9); "they do not regard my ways" (v. 10b). In other words, their continual testing of the Lord, or "putting (him) to the proof" (v. 9a), was rooted in a failure of memory, and a failure of memory of otherwise very memorable and mighty things at that!
Second, the missteps of Moses and Aaron at Meribah are not singled out here, though Numbers 20 seems designed to explain their particular failure, not that of the people themselves, to enter the promised land.
The most difficult and challenging part of the psalm is but a single word: "loathed" (v. 10), which cannot be properly understood apart from its partner or parallel phrase, which clearly places this divine complaint within the framework of the covenant. The phrase, "For forty years," modifies both verbs: "I loathed ... and said," but it is clearly that which the Lord observed in what he said that became the grounds for the former: "They are a people whose hearts go astray and they do not regard my ways" (v. 10). In other words, the Lord did not by any means set out to loathe his people; rather, the people's continual disregard for the Lord invited his loathing. If we object: such loathing is not in God's nature, that is entirely correct. But it is a reality within the terms of the covenant, properly understood; that is, not stripped of its downside for the sake of a naively positivist or purely optimistic theology. It is, in short, the curse for the which the straying people opted. The fault lies not with the Lord; rather, it is startlingly symptomatic of the essential reciprocity that lies at the heart of "covenant."
Psalm 95 is included as an optional lection in Year D, not because it is excluded from RCL—the whole psalm is recommended in Lent 3 and the less problematic opening section for Christ the King, both in Year A—but by virtue of its connections to the epistle lections for the Second and Third Sundays of Advent (Heb 3–4); as well as the Old Testament lections for Second Advent (Numbers 12 and 20) and a brief passage from Psalm 106:32-33 that I neglected to included in Year D (neither does it appear in RCL). Where the epistle is concerned, and by extension the gospel lection, the main point of comparison is the superiority of the ministry of Jesus to that of Moses, and for that matter, Aaron, Miriam, and John the Baptist, who was heir to the priestly vocation, but stood apart from it, and (according to Jesus) excelled "those born of women" (Luke 7:28).