“וַיַּסֵּב אֱלֹהִים אֶת-הָעָם דֶּרֶךְ הַמִּדְבָּר, יַם-סוּף”
“And God led the people around by the way of the wilderness to the Red Sea; ”
The Zohar brings the point about calling the Israelites ,’הָעָם’ ‘the People’. Previously Moses used “Let my people go” in reference to the Israelites. Now after the Erev Rav (Mixed Multitude) joined the Israelites (Exodus 12:38 “And a mixed multitude went up also with them”), the Torah calls them ‘the People’.
The Zohar reveals that the souls of the Erev Rav come from the negative side. During the 130 years that Adam stayed away from Eve, he sinned by connecting to a female from the other side, which resulted in the creation of all the negative souls mixed with the good side of Adam, that have since incarnated as the Erev Rav. The female is the vessel and has stronger effect on the souls that bond with that vessel. Therefore the souls were mostly negative with great desire for the self-alone.
Moses knew what took place soon after Creation and took the opportunity to correct the “Sin of Adam” by allowing the Erev Rav to join the Israelites in the exodus from Egypt. By taking them along on the spiritual journey to the Land of Israel, he hoped to elevate their souls, even though God had advised him against it. Because the Creator did not agree with Moses’ decision, the Torah refers to the Erev Rav as “the People” not as the Children of Israel.
Going through the wilderness was the shortest way to the Promised Land but God led the people on a longer path taking them through the correction process.
They needed to experience the power of God through miracles of the splitting of the Red Sea and the revelation of the 72 names, the water, the Manna from heavens and more.
In my opinion, if the Erev Rav didn’t join the Israelites then they would have gone directly to the Land of Israel and receive the Torah of Immortality in Jerusalem.
God let us ‘fail’ on the path so we can go through a longer process and build greater merit for the Final Redemption and Immortality.
When Mashiach comes he will make the final cleansing of negativity, until none is left in the world. Then the new Torah of Immortality will be revealed in the Land of Israel.
The song of the sea follows the splitting of the Red Sea and the 72 Names. It has secrets connecting it to the first Redemption, the Final Redemption, Mashiach and Immortality.