A Man of God's Own Choosing
What does it mean that "God looks on the heart"? Not what we think it means.
Samuel announced to Saul that the Lord had rejected him as king and "sought him a man after his own heart" (1 Samuel 13:14). Later, the Lord told Samuel that "the Lord sees not as man sees...the Lord looks on the heart" (1 Samuel 16:7).
It is GOD's heart - God's will, purpose, and intentions - that is in view in the choosing of David - not the character of David.