Israelites in Hardship. When the Hicsos retreat from Egypt, the new Pharaoh has no sympathies for the hated conqueror overlord and begins to oppress the Israelites. He makes them slaves. But all he achieves is strengthen them. Hard circumstances make for strong believers. God will not give us only good and blessed times. If He did, we would never grow up.
Moses is raised in the House of Pharaoh. Satan figured a savior was about to be born, so he inspired Pharaoh to kill all the Israelite boys. So where does God protect baby Moses? In the very house of Pharaoh. Satan can never outwit God, and we can never guess what surprise He has up His sleeve. As a matter of fact, the more desperate the circumstances, the more hopeless, the more mind-boggling what He will do. John 3 says the Spirit is like a wind; we never know where it comes from or where it’s going. So too, we cannot foretell, explain or anticipate how God will orchestrate the worst case scenario into His very plan.
Background comments: Exodus is perhaps the most compelling telling of Gospel outside of Isaiah and the Psalms. As the phrase goes:
The Old Testament is the New Testament CONCEALED. The New Testament is the Old Testament REVEALED.
The first five books of the Bible are called the Pentateuch and were all written by Moses (thanks, Pharaoh, for the great education! Mo put it to good use writing the Bible!). They are (likely) the first books of the Bible and therefore foundational.