Psalm 33:4 “For the word of the Lord is right and true; he is faithful in all he does.” It is obvious that David loved God and had a relationship with Him which was tight.  David trusted God with all his heart.  He must have written the Psalms because he wanted you and me to feel the same and to enjoy the life one can live only with that tight and loving relationship.