“And it was when Pharaoh sent the people of Israel, and God did not want to lead them through the land of the Philistines...”
Every "and it was" (vayihi) sounds like a sigh and denotes some pain. Here the pain came about because Pharaoh sent “the People of Israel,” which are the “mixed multitude” together with the nation.
When the Torah mentions "Bnei Israel," the Sons of Israel, it means the earnest part of the Jews. When, however, it calls them “Am Israel,” the People of Israel, it means the people who do good for their own honor and as a means to achieve power. The People of Israel were those that could turn back to Egypt, and it was because of them that God did not lead the nation directly to Israel. The mixed multitude is called “Erev Rav,” because through their desire for power they achieve the positions of importance (Rav) throughout history.
When Moses saw that, he understood that he needs to take the remains of Joseph with him – because now Moses knew that it will be necessary to split the Red Sea, and it will happen in the merit of Joseph, "The sea saw and fled...”
Art: Antonio Fillol Granell - The glory of the people