David sings about the way that God protects those who serve Him. The Psalms are used as a prayer book, a collection of songs, for meditation, for expression, and for learning more about our relationship with God & others. This includes the lessons learned in David’s life. He saw consequences for wrongdoing. David learned of God’s justice and mercy.