This psalm recalls Israel's unfaithfulness to God. Psalm 105 stressed God's faithfulness to the nation. Even though God's people proved unfaithful to Him, He remained faithful to them because of His covenant promises.
The writer, whomever he may have been, urged his audience to praise the Lord by thanking Him for His goodness, loyal love, and powerful works. God promised to bless those who are consistently just and righteous. Therefore the psalmist asked God to bless him with prosperity, joy, and glory.
106:6 The psalmist confessed that Israel had been unfaithful to God. This was true of his own generation as it had been true of former generations. This confession introduced a review of specific iniquities and wickedness.
106:7-12 The Israelites did not learn from the plagues that God could and would take care of them. Consequently when there appeared to be no escape at the Red Sea they complained rather than trusting and waiting (Exod. 14:11-12). Nevertheless Yahweh saved them from the pursuing Egyptian soldiers for His reputation's sake. He led them safely across and drowned Pharaoh's soldiers (Exod. 14:26-30). This salvation moved His people to praise Him (Exod. 15).
106:13-33 The writer did not recount Israel's rebellions in the wilderness in strict chronological sequence. His concern was to build from less serious acts of rebellion to greater ones evidently for the emotional effect this would produce in the reader.
Verses 13-15 describe the rebellion at Kibroth-hattaavah when the Israelites demanded meat and God sent them quails (Num. 11:4-34; cf. Lot, and the Prodigal Son). Verses 16-18 recall the rebellion of Dathan and Abiram against Moses (Num. 16). Verses 19-23 refer to the golden calf incident at Mt. Sinai (Exod. 32). "Their glory"(v. 20) refers to Yahweh. Verses 24-27 speak of Israel's refusal to enter the Promised Land from Kadesh Barnea when the spies returned and gave their discouraging report (Num. 14:26-35). Verses 28-31 refer to Israel's participation in the pagan worship feast of the Moabites, another flagrant departure from faithful allegiance to Yahweh (Num. 25). Verses 32-33 describe the rebellion at Meribah Kadesh when the people so aggravated Moses that he struck the rock rather than just speaking to it (Num. 20:2-13).
106:34-46 Verses 34-39 relate Israel's unfaithfulness in the Promised Land. Rather than destroying the Canaanites and their altars as God had commanded, the Israelites lived among these people, learned their customs, and worshipped their gods. They even participated in child sacrifice rites associated with pagan worship. These involved worshipping demons rather than the true God (cf. Deut. 32:17; 1 Cor. 10:20). Israel behaved as a harlot by being unfaithful to God.
Verses 40-46 summarize the approximately 300 years of Israel's history that the Book of Judges records (cf. Judg. 2:11-23). The Israelites sank lower and lower spiritually during those years. It was God's faithfulness to His covenant with them and His loyal love that led Him to have mercy on them repeatedly. When they cried out to Him He delivered them (cf. Judg. 3:15; et al.). The truth of verse 46 stands documented in Israel's later history (cf. Ezra 9:9; Neh. 2:8; Esth. 8:7-9; et al.).
This petition suggests that the psalmist lived and wrote during Israel's Babylonian captivity. It is a simple request for deliverance claiming no merit to obtain this favor. The writer relied exclusively on the Lord's covenant faithfulness and His loyal love for His people (v. 45).
The last verse blesses Yahweh and calls on God's people to praise Him. It is a fitting conclusion to Book 4 of the Psalter as well as to Psalm 106.
Prayers of confession such as this one help us maintain a realistic dependence on God's grace. They remind us that God is faithful even though His people have not been and so encourage faithfulness in us. Hopefully we will learn from the mistakes of the Israelites and not repeat the same errors (1 Cor. 10:11).