1 Samuel 16:1-13
When Samuel was sent to the house of Jesse to anoint one of his sons to be king, the old prophet apparently assumed that since Saul (the present king) was a man of striking physical appearance, God would choose another like him.
As Eliab, Jesse's oldest son, stood before him, Samuel said in his heart, "Surely the Lord's anointed is before him" (1 Sam. 16:6).
Then God showed Samuel that the divine standard was not according to a man's physical appearance but according to his heart attitude toward God.
"Look not on his countenance," the Lord said, "or on the height of his stature; because I have refused him: for the LORD seeth not as man seeth; for man looketh on the outward appearance, but the Lord looketh on the heart" (v. 7).
Paul referred to this fact when he said in Acts 13:22,23, "And when he [God] had removed him [Saul], he raised up unto them David to be their king; to whom also he gave testimony, and said, I have found David the son of Jesse, a man after mine own heart, which shall fulfil all my will. Of this man's seed hath God according to his promise raised unto Israel a Saviour, Jesus."
So God's choice was a heart choice. It is clear from this that God's thoughts are not our thoughts, and our ways are not God's ways (see Isa. 55:8,9). God looked for a man whose heart was right toward Him and found him in David.
"But know that the LORD hath set apart him that is godly for himself" (Ps. 4:3).