Law 18: Yahweh's Book of Laws
Deu 31:19 Now therefore write ye this song for you, and teach it the children of Israel: put it in their mouths, that this song may be a witness for me against the children of Israel.
Matthew Henry Commentaries
Yahweh directs Moses to deliver them a song, in the composing of which he should be divinely inspired, and which should remain a standing testimony for Yahweh as faithful to them in giving them warning, and against them as persons false to themselves in not taking the warning,
The written word in general, as well as this song in particular, is a witness for Yahweh against all those that break covenant with him. It shall be for a testimony, Mat_24:14.
The wisdom of man has devised many ways of conveying the knowledge of good and evil, by laws, histories, prophecies, proverbs, and, among the rest, by songs; each has its advantages. And the wisdom of Yahweh has in the scripture made use of them all, that ignorant and careless men might be left inexcusable.
1. This song, if rightly improved, might be a means to prevent their apostasy; for in the inditing of it Yahweh had an eye to their present imagination, now, before they were brought into the land of promise, Deu_31:21. Yahweh knew very well that there were in their hearts such gross conceits of the deity, and such inclinations of idolatry, that they would be tinder to the sparks of that temptation; and therefore in this song he gives them warning of their danger that way.
The word of Yahweh is a discerner of the thoughts and intents of men's hearts, and meets with them strangely by its reproofs and corrections, Heb_4:12. Compare 1Co_14:25.
Ministers who preach the word know not the imaginations men go about, but Yahweh, whose word it is, knows perfectly.
2. If this song did not prevent their apostasy, yet it might help to bring them to repentance, and to recover them from their apostasy. When their troubles come upon them, this song shall not be forgotten, but may serve as a glass to show them their own faces, that they may humble themselves, and return to him from whom they have revolted.
Those for whom Yahweh has mercy in store he may leave to fall, yet He will provide means for their recovery. Medicines are prepared before-hand for their cure.