Exodus 17:6 Behold, I will stand before thee there upon the rock in Horeb; and thou shalt smite the rock, and there shall come water out of it, that the people may drink. And Moses did so in the sight of the elders of Israel.
Exodus 17:13 And Joshua discomfited Amalek and his people with the edge of the sword.
As Israel journeyed, they learned many things about God, about His power, and about His ability to care for them and protect them.
In v.1-7, they were thirsty, and even though their attitude was wrong, God still provided water for them. Then in v.8-16, when attacked by the Amalekites, God protected them.
God was showing them that He is well able to provide and protect them. God doing this for them was due to His grace and mercy not due to their worth or merit as evidenced by their complaining attitude.
The same God who provided for and protected Israel can meet our needs and protect us. Let us go forth with confidence and courage, knowing that we serve and fight and live under the banner of God (“Jehovah-Nissi” v.15 – the Lord our banner).