A successful defense often relies simply on readiness, neutralizing a threat before a single blow is struck. The enemies of Jerusalem had plotted a surprise attack against the builders of the city wall, but this secret plan was exposed. The primary approach among commentators is that the enemies realized their plot was uncovered the moment they saw the people fully armed and braced for combat [מלבי״ם, ביאור שטיינזלץ]. Because the builders were so well prepared, God completely dismantled the enemy's strategy. Recognizing that the crucial element of surprise was lost, the attackers abandoned their goal of stopping the construction and retreated without initiating a battle [רלב״ג, מצודת דוד, מלבי״ם].
Once the immediate danger passed and it became clear that the attackers had given up, the builders could safely stand down. They dispersed from the central locations where they had gathered for war. With the threat entirely removed, every individual returned to the wall, resuming their original tasks in the construction effort [רש״י, מצודת דוד, מלבי״ם].