The Commander said that He was on neither side because Joshua should be on His side. As Commander of the Armies of the Lord, He leads, not follows. Joshua felt humbled by this experience and worshipped Him. After this encounter he felt victorious, on top of the world!