Yeah the David vs Goliath fight is a lot less one-sided when you remember David was a shepherd and a dab hand with a slingshot, he'd have been using it to defend his flock from predators from childhood and ancient armies fielded them as weapons of war. The man basically took a gun to a sword fight.
The lesson I think is less 'the weak can defeat the strong' in general and 'don't engage your enemy on his terms, engage him where you are strongest'.