Because David did that which was right in the eyes of the LORD, and turned not aside from anything that he commanded him all the days of his life, except only in the matter of Uriah the Hittite.
Read Chapter 15
George Leo Haydock
Hethite. This could not be excused. But all his other imperfections might not appear criminal in the eyes of the world, as they had some pretext of virtue; so that God reserves the judgment of them to himself, and to David's conscience, who confessed that he had sinned, 2 Kings xxiv. 10. (Tirinus)
Except David, Ezechias, and Josias, all the kings of Juda committed sin; (Ecclesiasticus xlix. 5.; Calmet) and not one of those who ruled over Israel, gave an example of virtue. (Haydock)
David soon entered into himself, with respect to his other failings. But he continued for a long time involved in the guilt of adultery and murder. (Sanchez)