The Hebrews were aware that the Brit Bein HaB’tarim forged between G-d and Avraham foretold of future Israelite enslavement in a foreign land, and some attempted to avoid that predicament by distancing themselves from their own brethren. Those Hebrews left their homes in Goshen and emancipated themselves in Egyptian society. Among them, some had neglected the commandment of circumcision, others engaged in idolatry (Tanchuma, Shemot 6).
That era of official Egyptian tolerance soon came to an abrupt end: “A new king arose over Egypt who did not know of Joseph.” (Shemot 1:8) The revered memory of the man who had saved Egypt from famine no longer mattered; his accomplishments were forgotten. Now, Bnei Yisrael were viewed as pariahs and as a threat. “He [Pharaoh] said to his people, ‘Behold he Children of Israel are stronger and more numerous then we.'” (Shemot 1:9)
Midrashim state that many Israelites did not leave Egypt, but rather died during the ninth plague of darkness. Perhaps, one can also speculate, once the persecution ended and the Israelites were respected as an entity, many chose to remain. For the next few generations, the Israelites suffered the full weight of persecution until the unleashing of the plagues.