Deuteronomy 31:21

And it shall come to pass, when many evils and troubles are befallen them, that this song shall testify against them as a witness; for it shall not be forgotten out of the mouths of their seed: for I know their imagination which they go about, even now, before I have brought them into the land which I sware.

God gave Israel a song that put His law, commandments, and history of His dealings with them into verse and music to stand as a witness for Him. He already knew their wayward imagination and rebellious intention to turn away even before He brought them into the promised land He had sworn to give. The song was to remain unforgotten in the mouths of their seed, memorized and taught to children and descendants, sung in worship, repeated in daily life, and sung while traveling. When many evils and troubles befell them, it would testify against them that their suffering followed their disloyalty, turning from God, and breaking of His covenant, for obedience to His law was their life while disobedience would bring His curse and displeasure. Putting God's requirements and history into song fixes them in mind and heart, preserving the memory of His care, goodness, and deliverance for later generations, so that even a long-forgotten childhood song can return in despair to weaken temptation and restore courage.

Song as Enduring Witness

The song spoken of is God's law and commandments and the history of His dealings with Israel put into verse and set to music for the people to sing. It was a song of instruction given for Moses to teach Israel, preserving their history and His providential care, goodness, mercy and deliverance in a form that could be sung. The commandments themselves were set to verse and song to be sung during the wilderness journey, so that their teaching would stay with the people.

It was ordained not to be forgotten, but to remain in memory and in the mouths of Israel's seed, descendants and children across generations. It preserved the memory of God's dealings with Israel so later generations could hear the history of the wilderness journey and learn its lessons. Their descendants could not forget this testimony once it was lodged in song.

Even now, before bringing them into the land He swore to give, God already knew their imagination, inclination and rebellious and wayward purpose to turn away. He knew beforehand their disobedient intentions and disloyalty while they had not yet entered the promised land.

When many evils, troubles, calamities and disasters befall them, this song testifies against them as a witness. Its testimony is that their suffering followed their turning from God, their disloyalty and their breaking of His covenant. It testifies beforehand to that disloyalty, so that when calamity comes its warning and witness have already been preserved.

The song is both a record of God's past dealings and a prophecy of future events, reaching to the final victory of the faithful people when Christ returns in power and glory. It stands as a lasting witness to God's care and to Israel's responsibility. It preserves a warning so the consequences of disobedience will not be forgotten, for obedience to God's law was their life, while disobedience would bring His curse and displeasure, and parents who raise children to reject His commandments face a sad account.

Teaching Generations Through Song

The verse commands memorizing the song and teaching it to children and descendants, singing it in worship, repeating it in daily life, and singing it while traveling so its words and teaching remain with the people. The commandments were set to verse and song for Israel to sing during the wilderness journey, and the song helped parents teach their children about God's providential care, goodness, mercy, and deliverance, keeping those events in memory. Children were to learn and sing its words as soon as they could speak, so that God's instruction would be impressed on their minds. Singing its important truths step by step taught them to heed God's Word, and passing God's law on through generations caused it to be retained in their hearts and kept throughout life. Obedience to God's law was their life.

The law was to be repeated and sung as Israel traveled through the wilderness, with music and marching helping keep its precepts before them and making them solemn and memorable. The people were to sing with respect and unselfishness toward one another, remembering Christ's presence in the cloud and fire. God directed Israel to put His law into songs so its requirements would be fixed in the people's minds and hearts as they traveled through the wilderness. The song preserved the memory of God's dealings with Israel and the history of their wilderness journey so later generations could hear and learn its lessons.

Repeating God's words in song helps fix them in memory, so that even a long-forgotten childhood song can return in a time of despair, weaken temptation, and restore purpose, courage, and gladness. The verse also warns that disobedience would bring God's curse. Parents who raise children to reject God's commandments face a sad account.