Israel fought two related battles in these verses. Joab leads Israel in the first battle. David leads Israel in the second battle.
David did not go to the battle with the Ammonites, the first battle. He sent Joab out (8.) David did go to the battle with the Arameans, the second battle (17). Why didn’t David stay in Jerusalem leaving the army to Joab in the first battle?
David is king. He exercised his power. David had been fighting wars since as a young lad he walked into the battlefield and slain Goliath. Now he is past middle age in a city he had conquered, in a luxurious home he built, surrounded by his wives, children, and attendants. He had grown tired of constant running and fighting. So when the first thread arose he stayed home.
David only came out of semi-retirement to fight the Arameans in the second battle because when that loose confederation of towns and settlements in what became Syria joined their full force they were as powerful as Israel. They were indeed a serious threat to David’s now comfortable life.
I don’t know of one single person; whether rich or poor, famous or infamous, proud or humble, accomplished or incompetent, male or female, wise or a fool that doesn’t get tired of doing the “same old, same old.” David was tired of going out to fight spring after spring after spring. He was tired of always being on the run.
Routine and good habits are very constructive and important to peace and productivity. A ship that’s anchor is unused ends up embattled and beaten by storms till even only a downpour sinks its tired hull. However, God also designed us to occasionally escape routine, lift the anchor, hoist the schooner, and experience a pleasant distraction or even a short-lived disturbance.
Design good productive habits, but do not neglect to address serious threats to the home.