Commenting on the function of poetic texts Genesis 49, Numbers 24, and Deuteronomy 32 in the Pentateuch, John Sailhamer in The Meaning of the Pentateuch likens them to “a Hollywood musical.”
The Pentateuch somewhat resembles a Hollywood musical. Its story is both interrupted and developed by the songs (poems). Also like a musical, the songs (poems) are not randomly spliced into the story. The songs (poems) develop and carry the central theme of the story. They are the primary means for developing what the narratives are about. A careful attention to the details of the songs (poems) clarifies the message of the Pentateuch.
Have you gathered from Sailhamer that poetic texts aren’t simply rhetorical flourishes? Good.
If you’re curious what that “message of the Pentateuch” is, you’ll definitely want to check out this fine (though oft repetitive) work.