The psalms are not randomly thrown together: the way they’re organized is very significant. They’re grouped into five “books,” mimicking the five books of Moses’ law. The first four books end with a verse of praise that belong to the book, not the psalm they’re attached to. The editor of the Psalms seemingly wanted the book’s structure to imply that, even though the psalms are mainly prayers written by believers, they bear the same authority as the Torah since it was God who gave them their prayers.
The ordering of the five books and of the psalms within each book tells us something about their overall meaning. The first book includes Psalms 1 through 41. This collection includes many psalms written by David, many of them laments. There are small connections between successive psalms, giving each of the books a discernible forward movement–with a predominance of laments, giving way to full-on praise in the fifth book. This suggests that while we endure hardships and pain in this life, we’re moving relentlessly toward a kingdom when all will be joy and praise.