The significance of these last two interactions that David has with individuals on his rushed journey out of Jersualem, fleeing from his son Absalom, who has mounted a coup, is that he reflects aloud on what the Lord's purposes might be.

And although we can reject the overall thesis of the man from Saul's family, Shimei, there are some aspects of his statement that are true.

And David reflects that the Lord's hand is in this, and he throws himself dependently on the Lord, trusting that the Lord will lead him through this dark valley in a way of goodness.

David's reflection drew me to reflect on the great hymn by William Cowper, God moves in mysterious ways.

great hymn by William Cowper….

God moves in a mysterious way His wonders to perform; He plants His footsteps in the sea, and rides upon the storm.
Deep in unfathomable mines of never-failing skill, He treasures up His bright designs, and works His sovereign will.
Ye fearful saints, fresh courage take, the clouds ye so much dread, are big with mercy, and shall break In blessings on your head.
Judge not the Lord by feeble sense, but trust Him for His grace; Behind a frowning providence, He hides a smiling face.
His purposes will ripen fast, unfolding every hour; The bud may have a bitter taste, but sweet will be the flower.
Blind unbelief is sure to err, and scan his work in vain; God is His own interpreter, and He will make it plain.


2Samuel 16:5 When King David got to Bahurim, a man belonging to the family of the house of Saul was just coming out. His name was Shimei son of Gera, and he was yelling curses as he approached. 6 He threw stones at David and at all the royal[b] servants, the people and the warriors on David’s right and left. 7 Shimei said as he cursed, “Get out, get out, you man of bloodshed, you wicked man! 8 The Lord has paid you back for all the blood of the house of Saul in whose place you became king, and the Lord has handed the kingdom over to your son Absalom. Look, you are in trouble because you’re a man of bloodshed!”9 Then Abishai son of Zeruiah said to the king, “Why should this dead dog curse my lord the king? Let me go over and remove his head!” 10 The king replied, “Sons of Zeruiah, do we agree on anything? He curses me this way because the Lord[c] told him, ‘Curse David!’ Therefore, who can say, ‘Why did you do that?’” 11 Then David said to Abishai and all his servants, “Look, my own son, my own flesh and blood,[d] intends to take my life—how much more now this Benjaminite! Leave him alone and let him curse me; the Lord has told him to. 12 Perhaps the Lord will see my affliction[e] and restore goodness to me instead of Shimei’s curses today.” 13 So David and his men proceeded along the road as Shimei was going along the ridge of the hill opposite him. As Shimei went, he cursed David, threw stones at him, and kicked up dust. 14 Finally, the king and all the people with him arrived[f] exhausted, so they rested there.