David was a human being, like you and me. David made mistakes. He sinned — not only in the matter of Bathsheba and Uriah. But David was a man after God’s own heart — he repented, once he came to the realization of his sins. Sometimes, though, it took him a while to understand. When studying David’s life, which was written down for our admonition, learning, and example, we will see a cause and effect relationship. When David did right, he reaped blessings, but when he did wrong, bad consequences were the result.
We are to read the life of David with New Testament eyes and in light of other Old Testament Scripture, explaining how God looked at David’s actions. David is not to be followed in every respect — the only human who has never sinned, and who is to be followed by all of us, is Jesus Christ.