If you read 1 Samuel you'll discover that Saul is continually jealous and suspicious of David. I always interpreted this passage as an example of an "impossible task" motif of folklore: the father who doesn't like a particular young man gives him an apparently impossible task--usually one that is expected to result in his death. Of course, the young man goes out and achieves this impossible task--and in this case, David goes the extra mile and kills another hundred Philistines, just to make his point clear.