2 Samuel 18:16

And Joab blew the trumpet, and the people returned from pursuing after Israel: for Joab held back the people.

Joab sounded the trumpet to hold back his men and bring their pursuit of Israel to an end. That halting of the pursuit belongs to the defeat of Absalom's rebellion and to the account of Absalom's death at Joab's hand. Absalom's rebellion was one of the family troubles and sorrows that grew out of David's sin and wrongdoing against Uriah. It belongs to David's later history after his great transgression, coming especially within his own family.

That later history records the judgments that followed the transgression and fulfills Nathan's prophetic denunciation. The rebellion and its sorrowful consequences are the retribution David suffered for his sin. In this setting the account shows that no one can go against God's laws without suffering, because every transgression carries an inherent curse. As part of the account in which Ahimaaz and Cushi carry news to the king, the verse bears the lesson that zeal alone does not qualify a messenger, who must have the message ready and know how to deliver it.