King David was the bomb dot com. They probably called him that before the Internet—that's how much people loved him. So it makes sense that there was an enormous literary and artistic effort to glorify David and his descendants.
Because David's rule is always connected with the might of God, scholars speculate that the writers of Psalms, and much of the Bible, worked in David's court. Why not make your boss sound awesome? Much of Psalms is even attributed directly to David, and the Bible in general works hard to craft an image of a good king who was a writer and a warrior.
Sure, David reigned three thousand years ago, but we know a good Golden Age when we see one.
Questions About The Royal House of Israel
Is King David an agent of God in Psalms? Is he some kind of prophet? Or is the monarchy always beneath God? How do the writers of Psalms balance praise for David with respect for God?
Why is King David so cool in God's book? Why do the authors make him look so good?
What's the relationship between the land of Israel, God, and David? Who owns what?
Why does the text include David (and occasionally Solomon) as the only perfect king in Psalms?