In these passages is the account of David and his followers defeating Israel and David’s son Absalom being killed by Joab, David’s commander. The battle ceased after Absalom’s death. David was deeply grieved at the death of Absalom and mourned greatly. There was therefore no celebration. Nor did David praise his followers. So, they returned to their home base in silence.
Joab wisely counseled David to stop his public mourning and praise those who saved David’s life. If David did not do this, Joab said David would lose the loyalty of the people and be rejected as King.
The Bible tells us to love our enemies, and David loved Absalom. However, loving our enemies must not be at the expense of those who are loyal and good to us. I believe that It is a greater priority to love our friends than to love our enemies.