Dovid HaMelech Takes the Hint
After Hashem lets Dovid miraculously kill a lion and a bear, Dovid understands there must be a reason and offers to fight Goliath.
In fact, this is exactly what the midrash says on Esther. Hashem hinted to two people who understood the hint. One of them was Dovid HaMelech. The midrash says that Dovid HaMelech took the hint that Hashem helped him miraculously kill a lion and a bear. Dovid said to himself: “Hashem would not have performed this miracle for me unless there was a reason.” Whereupon, he offered his services in killing Goliath.