The significance of this passage is extreme: God cannot and will not be for us unless we are first and foremost for God. He will step in and protect us without that relationship because He wants us to have a relationship with HIm, but we will not experience His full protection until we make the decision to follow HIm. In order for God to win, we must first surrender to HIs will and HIs power over our lives. What we ant will no longer matter, only what God wants will.
Why did the commander say that he was for neither side? Simple. Neither side was fully God's yet, so God remained neutral. Once Joshua made the active decision to walk in the light, God stepped forward and gave him his heart desire. God still works miracles today, folks, in the same way. Once we make an active decision to follow Christ, God steps in and protects us from further harm. We may still experience the stings because of our own stupidity, but over all the protection is felt on a daily basis.
Think of it this way: we go to conquer fear. Fear gets the best of us. We call upon the Lord, for peace, for strength, for guidance. All of a sudden, fear no longer gets the best of us, and we are confident in our steps. That's what it is to have the supreme Commander on our side. He gives us strength to face the challenges of an earthly life.