|“||God is all powerful
Jeremiah 32:27 Behold, I am the Lord, the God of all flesh: is there any thing too hard for me?
Matthew 19:26 But Jesus beheld them, and said unto them, With men this is impossible; but with God all things are possible.
God is not all powerful
Judges 1:19 And the Lord was with Judah; and he drave out the inhabitants of the mountain; but could not drive out the inhabitants of the valley, because they had chariots of iron.
The context of the chapter shows that the subject was Judah, not God; and thus it was Judah's weakness that was being discussed, not God's. The verse in context is saying that Judah was allowed by God to drive out the mountain inhabitants but not those in the valley.
|“||Judges 1:17 And Judah went with Simeon his brother, and they slew the Canaanites that inhabited Zephath, and utterly destroyed it. And the name of the city was called Hormah.
18 Also Judah took Gaza with the coast thereof, and Askelon with the coast thereof, and Ekron with the coast thereof.
19 And the Lord was with Judah; and he drave out the inhabitants of the mountain; but could not drive out the inhabitants of the valley, because they had chariots of iron.
So, why would God allow Judah to drive out one but not the other? God did not want to let Israel conquer too quickly so the lands being conquered wouldn't fall into disrepair and chaos. As such it was deliberate on God's part to let Judah win one major battle but not conquer everything in sight. The Israelites wanted God to drive out their enemies quickly, but this would not have been in keeping with what God said He would do. God had earlier told them He would deliberately not drive out their enemies in one year, lest the land become desolate without enough people to tend it so that wild animals like bears and lions became hazardous.
|“||Exodus 23:28 And I will send hornets before thee, which shall drive out the Hivite, the Canaanite, and the Hittite, from before thee.
29 I will not drive them out from before thee in one year; lest the land become desolate, and the beast of the field multiply against thee.
30 By little and little I will drive them out from before thee, until thou be increased, and inherit the land.
As a result, God allowed Judah to drive out the inhabitants of the mountains, but not to overtake the entire land. God could have given them victory over those with chariots of iron, but allowed them to be stopped by a formidable military presence, as He had earlier said He would, for their own good. It may be that God warned them not to face the armies of the valley and the Israelites attempted to win on their own anyway, as the Bible records elsewhere. (cp. Num. 14:41-45; 1 Ki. 22:28-29)