Everyone saw David as a boy who only played with sheep and knew nothing about fighting in battle.  David saw himself differently because He had favor with God.  Had God never positioned him as a shepherd he would have never killed a lion and a bear and would have never been prepared to slay a giant.