Isaiah 55:8 For my thoughts are not your thoughts, neither are your ways my ways, saith the Lord. 9 For as the heavens are higher than the earth, so are my ways higher than your ways, and my thoughts than your thoughts.
[Patriarchs & Prophets pp 672] God works out His plans, though to human eyes they are veiled in mystery. Men cannot understand the ways of God; and, looking at appearances, they interpret the trials and tests and provings that God permits to come upon them as things that are against them, and that will only work their ruin. Thus David looked on appearances, and not at the promises of God. He doubted that he would ever come to the throne.
Long trials had wearied his faith and exhausted his patience. The Lord did not send David for protection to the Philistines, the most bitter foes of Israel. This very nation would be among his worst enemies to the last, and yet he had fled to them for help in his time of need. Having lost all confidence in Saul and in those who served him, he threw himself upon the mercies of the enemies of his people. David was a brave general, and had proved himself a wise and successful warrior.
But he was working directly against his own interests when he went to the Philistines. God had appointed him to set up his standard in the land of Judah, and it was want of faith that led him to forsake his post of duty without a command from the Lord. God was dishonored by David's unbelief.
1st Samuel 27:1 And David said in his heart, I shall now perish one day by the hand of Saul: there is nothing better for me than that I should speedily escape into the land of the Philistines; and Saul shall despair of me, to seek me any more in any coast of Israel: so shall I escape out of his hand.
May The Lord add His blessing to the study of His word. God bless!