"And David’s anger was greatly kindled against the man; and he said to Nathan, As the Lord liveth, the man that hath done this thing shall surely die:And Nathan said to David, Thou art the man." (2 Sam: 5-7)
When God went to choose a spirit, before the foundation of the world, to become the most famous king of Israel, it was of this moment that he thought, when Nathan the prophet would tell the sinning king the parable of the little ewe lamb. Men who would be mighty kings in other lands were passed over: God chose David because the others would have had Nathan killed, his body left for wild dogs to fight over. David had a soul that could face its own sins. David alone, of the unborn kings, would find the strength to say, "I have sinned before the Lord." David alone, of all the kings, would count each subsequent trial as necessary and just.
This is why the Messiah was sent to the lineage of David.