As the Philistine military prepares for battle, a grand review of their forces takes place, revealing a highly organized army and a deeply complex situation involving David. The high-ranking Philistine officers and commanders lead the procession [מצודת ציון, ביאור שטיינזלץ]. The primary approach among commentators is that the vast numbers mentioned in the account do not refer to thousands of commanders. Instead, a small number of leaders march at the front, followed by the entire army neatly divided into organized units of hundreds and thousands of soldiers.
In contrast to the regular troops, David and his men march at the very rear alongside King Achish. They are placed at the back because they are not intended to serve as standard frontline fighters. Rather, they are specifically assigned to act as the king's personal bodyguards [מלבי״ם].
Marching with an enemy force on its way to attack Israel places David in a puzzling and difficult position. He is forced to comply with the king's orders because he lives under Philistine authority. Furthermore, he must maintain the deception he previously built, having convinced the king that he had been raiding Israelite towns and was now despised by his own people. Despite outward appearances, David's true, hidden goal in joining the march is to act as a covert operative. He plans to sabotage the Philistine campaign and disrupt their attacks against Israel from the inside. This mission would be easy to carry out precisely because the Philistines have placed their complete trust in him [רלב״ג].