After years of hiding from Saul in mountain strongholds, David would have had a real understanding what these words meant when he wrote them:
Psalm 18:1-3 I love you, Lord; you are my strength.
The Lord is my rock, my fortress, and my savior;
my God is my rock, in whom I find protection.
He is my shield, the power that saves me,
and my place of safety.
I called on the Lord, who is worthy of praise,
and he saved me from my enemies.
The concept of God being a rock and fortress was not just theory. It had been David’s life for years while he was on the run from Saul.