"To the choirmaster, a psalm of David. An oracle of transgression to the wicked. This is what the scripture says (Deuteronomy 33:29), 'Happy are you, O Israel! Who is like you, a people saved by the Lord?'
The Holy One, blessed be He, fights the wars of Israel and ensures their victory. And it also says (Deuteronomy 34:11-12), 'For all the signs and wonders, and for all the mighty deeds and the great terror which Moses performed in the sight of all Israel, there has not arisen a prophet since in Israel like Moses, whom the Lord knew face to face.' Only Moses spoke with God. The Holy One, blessed be He, sent him and ensured Moses' victory.
And so Deborah says (Judges 5:12), 'Awake, awake, Deborah! Awake, awake, break out in a song! Arise, Barak, lead away your captives, O son of Abinoam.' And when David went down to fight Goliath the Philistine, what did he say? (1 Samuel 17:46) 'This day the Lord will deliver you into my hand, and I will strike you down, and cut off your head; and I will give the dead bodies of the host of the Philistines this day to the birds of the air and to the wild beasts of the earth; that all the earth may know that there is a God in Israel.'
And when the women were singing and dancing (1 Samuel 18:7) 'Saul has slain his thousands, and David his ten thousands,' David said to the Holy One, blessed be He, 'You gave me the victory, and I will also give You the victory.' To the choirmaster, a psalm of David. And David looked at Goliath and saw that he was a mighty and fearsome warrior, adorned with all kinds of armor. He thought to himself, 'Who can defeat him?'
But when he saw that Goliath was blaspheming and mocking, he said, 'Now I know that I can defeat him, because he is not afraid of the Lord.' As it is said, 'An oracle of transgression to the wicked.' From here we learn that the Holy One, blessed be He, judges the wicked only when they have no fear of Him. And likewise, the Holy One, blessed be He, says to Israel (Jeremiah 2:19), 'Your wickedness will chastise you, and your apostasies will reprove you.
Know then, and see, how evil and bitter it is for you to forsake the Lord your God.' Therefore, it is said, 'There is no fear of God before his eyes.'"...