When King David came to Bahurim, there came out a man of the family of the house of Saul, whose name was Shimei, the son of Gera, and as he came he cursed continually. And he threw stones at David and at all the servants of King David, and all the people and all the mighty men were on his right hand and on his left.
2 Samuel 16:5-6
At the lowest point of David's experience as king in Jerusalem, as his throne is overtaken by Absalom his son and he must flee out of the city for safety, this strange little man named Shimei comes out of the city to curse David. He runs along the top of the ridge as David's retreating force marches below, vacating Jerusalem. And as he follows along he shouts curses at the king from above, pelting everyone with stones and kicking dirt down upon them in showers as they go. It makes the retreat that much harder. It is literally a case of adding insult to injury.
David's men are tired of it. Any one of David's warriors would gladly dispatch the annoyance! But David holds them back. Shimei is a distraction, and in David's humility at the moment, he accepts that God may have sent the weird raging dust kicker for a reason. The real issue was not a little dirt and rock. The kingdom was fallen. The tirade of one lone angry little crackpot was not significant in that light.
Drifting into putting energy on irritating distractions can pull leaders away from bigger issues. And this a leadership moment for David. He shows he is still kingly, even if he has lost a kingdom temporarily. His choice for mercy and for focus on the real issues proves that David is still the leader that Israel needs, even if the nation does not think that they want him anymore.