1 Samuel 17:18
And carry these ten cheeses unto the captain of their thousand, and look how thy brethren fare, and take their pledge. And carry these ten cheeses unto the captain of their thousand, and look how thy brethren fare, and take their pledge.
Jesse sent David to the Israelite camp with provisions from his father for his older brothers, including a gift for the captain of their thousand, to find out whether they were safe and well and to bring back word from them. That humble errand of carrying food and checking on his brothers' welfare is what brought David to the camp.
There he heard Goliath defy Israel, so the visit served a higher purpose of directing him to the place where he could save Israel from its peril. In that setting David stands as a humble contrast to Goliath, trusting in God rather than relying on Saul's armor or his own strength, while Goliath was boastful and confident in his weapons. Ministers should follow David's example by not provoking discussion and then trusting in prepared arguments, but by humbly relying on God for truth to prevail.