Adam Clarke Commentary
חמשים chamushim . It is truly astonishing what a great variety of opinions are entertained relative to the meaning of this word. After having maturely considered all that I have met with on the subject, I think it probable that the word refers simply to that orderly or well arranged manner in which the Israelites commenced their journey from Egypt. For to arrange, array, or set in order, seems to be the ideal meaning of the word חמש chamash . As it was natural to expect that in such circumstances there must have been much hurry and confusion, the inspired writer particularly marks the contrary, to show that God had so disposed matters that the utmost regularity and order prevailed; and had it been otherwise, thousands of men, women, and children must have been trodden to death.
Now, let's look at the context.
Exodus 13
New King James Version
17 Then it came to pass, when Pharaoh had let the people go, that God did not lead them by way of the land of the Philistines, although that was near; for God said, “Lest perhaps the people change their minds when they see war and return to Egypt.” 18So God led the people around by way of the wilderness of the Red Sea. And the children of Israel went up in orderly ranks out of the land of Egypt.
The context tells us that they were orderly as they left Egypt and not that they were marching for war.