And when he had removed [Saul], he raised up David to be their king, of whom he testified and said, ‘I have found in David the son of Jesse a man after my heart, who will do all my will’ (Acts 13:22, English Standard Version, emphasis mine).
Considering some of David’s failures, it really seems like God may have misjudged. For instance, take a look at 2 Samuel 11:1–15 and see how David commits adultery topped off by murder in less than a chapter.
Yet, later in that same book we can see a bit of the heart our Lord noticed. Just imagine having a son who rebelled against you and (albeit with a bit of a cooling down period) you show him mercy…only to have him try to dethrone you again (which includes him alpha-dog sleeping with your concubines). Being king is so important to your boy that…
17 Moreover, Ahithophel said to Absalom, “Let me choose twelve thousand men, and I will arise and pursue David tonight. 2 I will come upon him while he is weary and discouraged and throw him into a panic, and all the people who are with him will flee. I will strike down only the king, 3 and I will bring all the people back to you as a bride comes home to her husband. You seek the life of only one man, and all the people will be at peace.” 4 And the advice seemed right in the eyes of Absalom and all the elders of Israel (2 Samuel 17:1–4, emphasis mine).
Your son thinks killing you is a good idea.
Now, pretend you are David. You are a far better strategist than your mutinous son, and it is time for your counterpunch:
18 Then David mustered the men who were with him and set over them commanders of thousands and commanders of hundreds. 2 And David sent out the army, one third under the command of Joab, one third under the command of Abishai the son of Zeruiah, Joab’s brother, and one third under the command of Ittai the Gittite. And the king said to the men, “I myself will also go out with you.” 3 But the men said, “You shall not go out. For if we flee, they will not care about us. If half of us die, they will not care about us. But you are worth ten thousand of us. Therefore it is better that you send us help from the city.” 4 The king said to them, “Whatever seems best to you I will do.” So the king stood at the side of the gate, while all the army marched out by hundreds and by thousands. 5 And the king ordered Joab and Abishai and Ittai, “Deal gently for my sake with the young man Absalom.” And all the people heard when the king gave orders to all the commanders about Absalom (2 Samuel 18:1-5, emphasis mine).
Well, there you go. Yes, David had some big problems, but it seems to me that at times the compassionate heart of Jesus can be seen quite clearly.