Who Were the Original Erev Rav?
Rav Menahem Menashe ZT"L, in his book Ahavat Hayim, brings down an explanation in a long footnote from the book Shemeina Lahmo that has a fascinating idea as to who the Erev Rav were that also answers many other questions. Here is my translation:
When Yosef said to the Sar Hamashkim: "But have me in thy remembrance when it shall be well with thee, and show kindness, I pray thee, unto me, and make mention of me unto Pharaoh, and bring me out of this house," what was Yosef requesting from the Sar Hamashkim? And he told him to mention him before the king of Egypt as if Yosef did some sort of favor to Par'oh earlier and now he's telling the Sar Hamashkim to mention him before the king, or as if there was some sort of protexia earlier between them that Yosef sent to mention him before the king that he will save him from prison? This idea cannot be right since Yosef never saw Par'oh and Par'oh never saw Yosef, so how could he send to now mention him before Par'oh?
And furthermore, since he was a slave and him master put him in prison for being suspected with his wife - even though it wasn't true - but nevertheless, logic dictates that Par'oh would believe the master over the slave.
Also, what Yosef said, "For indeed I was stolen away out of the land of the Hebrews," it is implied from the verse that this is what Yosef is commanding the Sar Hamashkim before the king of Egypt - "that I was stolen". What was Yosef thinking? Just because he was stolen, the king will save him? It's known that at those times, when they kidnapped someone, the law was that he would be sold as a slave. Even nowadays [i.e., 1884, when the book was printed], in Africa and Asia, these things occur where they kidnap people by force and sell them as slaves and this is no crime at all in those countries - so especially at that time! So how did Yosef want to find favor, kindness, and mercy in the eyes of Par'oh the King of Egypt?
We also find that when Yosef was ruler in Egypt, he moved the Egyptians from city to city, and not only that, but he commanded them to get circumcised and when they cried out in the ears of Par'oh, he told them, "Go to Yosef [and do whatever he tells you]." This means that the Egyptians suffered under Yosef terribly - not only did they become exiled from their cities and places, he also commanded them to get circumcised by force. And if they weren't circumcised, Yosef would not give them bread. And when they cried out to Par'oh, Par'oh told them, "Whatever Yosef tells you, do." And we don't find Par'oh protesting Yosef's actions at all.
And that which it says later, "Now there arose a new king over Egypt, who knew not Joseph," how is it possible that he did not know the wise Yosef, who rule Egypt for 80 years whereas no other king in the world ruled for so long, and who, with his wisdom, saved Egypt and the entire world from perishing from starvation? And even though there are some rabbis who said that it was the same Par'oh but made himself out like he didn't know [Yosef], but the truth is that he did not know [Yosef].
We also see that when Israel left Egypt, many Erev Rav left with them - thousands and myriads more than Israelites - because the Erev Rav were involved in the back-breaking work in Egypt just like Israel without a difference. One could ask: who brought the Erev Rav into the servitude of Egypt? And from where were there such a large amount of Erev Rav? We know that upon Israel, it was decreed "that thy seed shall be a stranger in a land that is not theirs, and shall serve them; and they shall afflict them," but there was no similar decree upon the Erev Rav, so why did the Egyptians enslave them with harsh labor as well?
In order to answer all this, you should know that our Holy Torah is G-dly - it is not a historical report like people write in the newspapers, Has Veshalom. Rather, what Hashem Yitbarach is informing us in His Holy Torah applies to us in all generations in order to know His providence over our fathers and over us. However, that which applies to the history as to what occurred in those days, and the topics of kings, countries, and the political situation that only occurred then - doesn't apply to us at all. However, if we delve deep into the matter, then many ideas and topics that we didn't know earlier can be revealed to us, and through this, we can understand many hidden things in the Torah.
This is just as Haza"l saw in the eye of their wisdom that during the days of the forefathers and even during the days of Ya'akov, Arab kings broke into Egypt and usurped the kingdom and ruled there for a number of centuries. And the Egyptians called them "Hyksos", just like Rabbeinu N. Halevi brings down in his book Hikrei Kadmoniot that all the Arabs were shepherds and they were called "shepherd kings", who ruled over Egypt during the days of Yosef. And the Par'oh King of Egypt at the time of Yosef was not Egyptian, but was one of the shepherd kings from the Arab kings. For this is how Onkelos translates "לישמעאלים" as "לערבאי" [i.e., to Arabs] from the family of Avraham who were all shepherds and from the children of Yishmael and from the children of Ketura, who conquered Egypt under their hands forcefully against the will of the Egyptians and they subjugated them against their will. And these kings brought along with them many of their Arab brethren and made from them judges, officers, rulers over the Land of Egypt, and generals over the army to be assured that they will be loyal to their king from the children of their tribe. And they were to the Egyptians like thorns in their eyes. And the Egyptians hated the king and his men with the epitome of hate, but they were forced to bear their burden.
And this is why Yosef asked the Sar Hamashkim to remember him before King Par'oh - for he was kidnapped from the land of the Hebrews. He wanted to say that he was a Jew, and Yosef was hoping that when the king will hear that he is from the land of the Hebrews from the children of Avraham the Hebrew from the family of the king, he would definitely draw his kindness upon him and he will find kindness and favor in the eyes of the king and he will set him free. And the truth was that such occurred. When the king heard about Yosef, he immediately sent for him. And when he also saw his great wisdom, the king did not pay attention to the laws and statutes of Egypt in those days that a slave cannot rule or wear royal garb. And the king did with Yosef against the laws of Egypt and appointed him as a ruler over the entire Land of Egypt and left him in charge of all royal matters. And he was very happy that he found in Yosef a loyal man from his family whom he could trust with all his heart and who will be loyal to him, to his kingdom, and to his throne against the Egyptians who are his arch-enemies.
And this is why shepherds were an abomination to Egyptians since this Arab king who ruled them by force and all his officers were shepherds. And from their great enmity of the king, they were not able to eat bread with the Hebrews and they also couldn't eat together with the Arabs because of their great hatred for them. And this is why when the King of Egypt heard that the brothers of Yosef came, he requested of them that they all come with their father to Egypt, and he gave them wagons by the mouth of Par'oh, and he was very happy about them, and he requested of them that they settle in Egypt in order to increase the Hebrew population who are loyal to his rulership in Egypt.
And this is why when they first came, Yosef commanded them that if Par'oh asks them about their profession, they should specifically answer that they are only shepherds so that the king knows that they are from his family and from his land who are all shepherds - even though this is an abomination to the children of Egypt - since the king was from a family of shepherds and the shepherd kings usurped the Egyptian government and ruled them by force, which is why all shepherds are an abomination to Egypt. However, in the eyes of the king and his officers, this was an honor and a great thing because only these men from the children of Ketura and Yishmael and from Arabia did the king draw close to him to make them rulers, officers, and generals. And also from the brothers of Yosef, he wanted to make into generals and rulers over the cattle, but they did not want this. And Par'oh did all this to add loyal subjects to his kingdom.
And Yosef was also very loyal to his king, and he did with the Egyptians what he did in order to subjugate them. He moved them to cities from one end of Egypt until the other, he bought them as slaves to Par'oh, and according to Haza"l, he commanded them to circumcise themselves (since the king was already circumcised) and the king did not protest, but just the opposite - he commanded the Egyptians, "Go to Yosef. Whatever he tells you, do." And he was very happy that he had a loyal and smart viceroy like Yosef. Therefore, the fear of Yosef and the fear of all his brothers while they were still alive fell upon the Egyptians - and the Egyptians could not lift their heads up until Yosef, his brothers, and that entire generation died. Then, all the Egyptians rose up like one man and rebelled against their king, and in the harsh war, they deposed him and they took off the yoke of the shepherd kings, and that is when "A new king rose in Egypt who did not Yosef.
The new king was already an Egyptian from birth - the head of the rebels - and he made himself out as if he did not know Yosef, meaning he did not want to know or mention any merit for Yosef. Rather, just the opposite, to the entire house of the children of Yosef and to all the Hebrews from the family of Yosef and to all the Erev Rav from the children of Ketura and Midyan, he became a great foe and enemy.
His first advice was to take revenge against all who were friends with the previous king, who were the Hebrews and my people from Aram, Midyan, the children of the East, and from Arabia. From all these, whom the previous king drew close to him in Egypt. And they are all called by the name "Erev Rav", who all settled in Egypt from the time the shepherd king ruled. And the new king was afraid that perhaps he will increase in numbers there , and if the shepherd kings - the Arab kings - will come for war, then "they also join themselves unto our enemies, and fight against us, and get them up out of the land."
He therefore consulted with his people, "Come, let us deal wisely with them" and their advice was to build store-cities for Par'oh, which are strong and fortified cities. And by doing this, they will pressure all the aliens who settled in the Land of Egypt during the days of the shepherd kings. And so they did - all the work they worked was back-breaking and cruel - revenge without mercy. And they threw the boys into the Nile in order to weaken them and to also break whatever remained of their spirit - until Hashem had mercy over Israel and saw their affliction and sent His chosen Moshe and took them out of Egypt with signs and wonders. And then, because of the freedom of Israel, the Erev Rav also went out together with Israel from Egypt, as they also suffered harsh afflictions in Egypt just like Israel.
And from here, all that we asked has been answered.