Life in the open fields presented constant dangers for shepherds and their vulnerable flocks. David and his men stepped into this harsh environment to provide absolute protection and active assistance to Nabal's workers. They acted as a protective wall, tightly guarding the camps against external threats such as robbers and wolves [מצודת דוד, מלבי״ם, ביאור שטיינזלץ]. Because the shepherds were stationed out in the exposed wilderness, they required this continuous, unbroken security throughout the day and the night.
The support went far beyond a passive security detail. David's men did not merely stand guard. They actively engaged in the daily labor, working side by side with Nabal's men to tend the sheep [מלבי״ם].
From a legal and religious standpoint, this intense level of security and labor was not just a friendly favor. Nabal directly profited from the preservation of his livestock and property. Because this financial gain would have been impossible without the intervention of David's men, Nabal was legally bound to compensate them for the substantial monetary benefit their presence provided [חומת אנך].