Songs have a pattern. There’s a rhythm and sound to it, maybe a rhyme scheme. So if you remember a bit of a song, that helps you to remember the rest of it.
When it’s just text, there’s nothing much to clue you in about what the next line might be.
It’s the same reason why a list of words with no context is harder to memorise than a specific text. If I remember the line “All happy families are alike” then there’s only so many things that could logically follow that. If I pick 20 random words out of the dictionary then that’s way harder to remember because remembering one doesn’t help to remember the others.
Latest Answers