The king of Egypt had a problem. The Hebrews, an ethnic minority, had grown strong and numerous in his country. Operating out of a position of fear, he looked for ways to manage the "problem."
First he oppressed them with taskmasters and forced them to do hard labor for the kingdom. The Hebrews complied and became the builders of Egyptian cities such as Pithom and Rameses. However, rather than having the effect of breaking their spirit and keeping them down, the Hebrews continued to multiply. In fact, the "problem" grew worse.
Pharaoh's next idea was to increase the servitude of the Hebrews, making their lives even more difficult. He oppressed them with hard service in construction and field labor. Twice the Bible says that the Egyptians were "ruthless" in the extreme hardship they forced upon the Israelites.
Still, the "problem" increased! Pharaoh took the next step of social engineering: the midwives of the Hebrews were instructed to kill newborn Hebrew boys. Only the girls would be allowed to live. This form of "birth control" failed, however, because the midwives feared God more than Pharaoh. When it became clear that the Hebrew boys were not being killed, Pharaoh summoned the midwives and interrogated them as to why. Their excuse was that the robust Hebrew women were having healthy babies before the midwives could arrive. (If you've ever wondered about God's view of incomplete honesty, Exodus 1 may give you some insights!)
Finally, Pharaoh unveils his new policy. Because the midwives had failed to kill the Hebrew boys during labor, any newborn male children were to be cast into the Nile. Pharaoh must have felt that he had at last solved the nation's problem with this final solution. (This moment represents the first of many attempts to eradicate the nation of Israel.)
The irony is that Pharaoh did all this to try to preserve and protect his beloved Egypt. But by offending the God of life in this way, the king was actually sowing the seeds of his nation's destruction. Social injustice is never wise policy. The practice of infanticide would come back to be brutally visited upon the Egyptians as the final plague, reaching up to even the household of the later Pharaoh himself.