A battlefield commander must carefully manage how bad news is delivered to the king, especially when a tactical disaster is part of a secret royal plot. Joab briefs his messenger on how to report the recent casualties, fully anticipating David's anger over the army's foolish decision to get too close to the enemy wall.
Joab expects the king to cite a famous historical blunder to highlight the severity of this tactical mistake: the shameful death of Abimelech in the city of Thebez [מצודת ציון]. During that battle, a woman fatally struck Abimelech by dropping an upper millstone on him [מצודת ציון, ביאור שטיינזלץ]. In recounting this, Abimelech's father, the judge Gideon, is referred to as the son of Jerubbesheth. Because the terms for the idol Baal and the word for shame are often used interchangeably, the name Jerubbaal is altered here to Jerubbesheth [מצודת ציון]. Alternatively, this name implies that Gideon actively fought and created strife against the shameful idol of Baal [רש״י].
This historical example serves a clear purpose: to emphasize how incredibly vulnerable soldiers are when they approach a fortified wall. From such a close distance, even women can easily strike down seasoned warriors [מצודת דוד, מלבי״ם]. The primary approach among commentators is that the anticipated royal outrage is directed at the sheer recklessness and pointlessness of the troop movements. Marching right up to a wall is only tactically justified at the final stage of a siege when soldiers are actively climbing it, rather than as an aimless maneuver [מלבי״ם].
To immediately calm David's expected fury, Joab instructs the messenger to add one final detail: Uriah the Hittite is also dead [מצודת דוד]. Commentators agree that Joab crafts a highly sophisticated, double-layered message here. His goal is to inform David that the secret order to eliminate Uriah has been carried out, all while keeping the messenger completely unaware of the conspiracy [מלבי״ם, מצודת דוד, ביאור שטיינזלץ].
From the messenger's point of view, mentioning Uriah's death serves to explain the military failure and shield Joab from blame. The messenger believes he is showing the king that the disaster was not caused by a reckless mob, but was rather an error in judgment by a veteran commander [ביאור שטיינזלץ]. Another perspective is that Uriah acted as a fearless hero who charged forward, sweeping the rest of the troops into danger with him [מלבי״ם]. Alternatively, the sudden fall of such an experienced warrior, who failed to protect himself despite his vast battlefield knowledge, suggests to the messenger that the tragic event was ultimately a heavenly decree [מצודת דוד]. However, Joab's true, hidden intent, meant for David's ears alone, is simply to confirm that the king's hidden will has been fully accomplished.