Following their defeat and hasty retreat, the Philistines abandoned their idols on the battlefield [ביאור שטיינזלץ]. The fate of these statues presents an interesting narrative, especially when compared to a parallel historical account that explicitly states David burned them. The primary approach among commentators is that the two records are in perfect agreement. The action taken by David's men was simply to light a fire and burn the statues, completely destroying the forbidden objects [מצודת ציון, רד״ק, אברבנאל].
Alternatively, based on the teachings of the early sages, David's men literally carried the idols away. To resolve the apparent contradiction with the account of them being burned, a specific sequence of events is described. Initially, David and his men began throwing the statues into the fire, adhering to the strict prohibition against gaining any benefit from pagan worship. During this process, Ittai the Gittite, a Philistine who had defected to David's side, arrived at the scene. Because religious law allows a non-Jew to formally cancel an idol's sacred status, Ittai did exactly that, rendering the materials permitted for normal use. At that moment, David's men stopped the fire and simply took the remaining materials for themselves [רד״ק, אברבנאל].
This legal transformation also explains a subtle shift in how the statues are described. In the parallel historical record, which captures the moment before this cancellation, they are referred to as "their gods." However, in the current account, which details their capture after they lost their divine status, they are simply called "their idols" [מלבי״ם].
Another way to resolve the two accounts offers a different timeline. In this view, David and his men first carried the captured statues all the way to Jerusalem. Their goal was to publicly display and mock the defeated idols. Only after thoroughly disgracing them did David issue the final command to burn them completely to ashes [אברבנאל].