I’ve been reading some Jewish commentaries and they suggest a possible answer to this question. They, too, wonder how and why things turned out the way they did.
There’s a bit of humor in the answer and I’ll say that, so that you don’t miss it – well, and I’m not that good a story teller, either.
but, the upshot is this, they reason that God tried to offer all the nations a chance to be His chosen people, but only the Jews agreed to it. Considering all the trouble they experienced in their history, they wonder why they even agreed to it, as well. You know what I mean? IF God treats His chosen people this way, sheesh.
Have you read Genesis? When God makes a covenant with Abraham, He tells him that this nation would have to go into slavery. I forget the exact chapter and verse there, but that is the real story there.
Further, it is not just the Egyptians – in general – who put Israel into slavery. It is particularly Joseph, one of the sons of Israel, who was the ruler of Egypt under Pharoah, who was giving people grain during a famine in exchange for their liberty who put the Israelites into slavery. that is an ironic twist of history to fulfill God’s will.
But, in an even larger sense, God put the Israelites into slavery for the very reason of rescuing them and liberating them from it. And, that is a big deal in the OT, that God reminds “Israel” of that fact.
Yes, it’s hard for some people to accept how God has worked in history. Obviously God did not choose to work through some conquering nations and leaders like Rome, Alexander and the Greeks, the Turks, etc. He chose a nation that was weak and would have motive to put their reliance not in themselves but in God.
The OP is a very non-trivial question with a non-trivial answer.