Each year, when we read the Exodus story and again when we encounter it at the Passover seder, we are confronted with a serious moral question. We must ask ourselves how we feel about the nature of the collective punishment of the Egyptians. If we examine a number of customs and teachings that we find in the Jewish tradition about the suffering of the Egyptians, we can see that there has never been an easy relationship with this problem.
First, it is clear here in our text. When the 10th plague is described, we see it afflicting the firstborn sons of Pharaoh on down to the firstborn in captivity—even the firstborn cattle. We may not be comfortable with the idea of the plague, but we can understand why it is applied to Pharaoh, and perhaps even to the Egyptians who were complicit in the enslavement of the Israelites. Surely, though, the captives in prison played no role in enslaving the Israelites; rather they were probably no better off than the Israelites. That is why the midrash feels the need to articulate their role in the story. The Rabbis are uncomfortable with the idea that any innocent person would be punished in the plagues, and they go to great lengths in this and other midrashim to identify the guilt of the Egyptians.
We see this discomfort at other times as well. When we read the 10 plagues at the seder, we take 10 drops of wine out of our glasses to diminish our joy on account of the suffering of the Egyptians. We also find a midrash (Talmud Sanhedrin 39b) saying that the angels wanted to sing out as the waves crashed over the Egyptians in the Red Sea and God admonished them: "My creations are drowning in the sea and you wish to sing?"
When we approach the Exodus, we can feel the discomfort of our ancestors at seeing all of the Egyptians punished without a clear sense that each was accountable. It is for this reason that this midrash establishes the guilt of all those who were punished. Despite this justification, however, we also hold traditions that remind us that the freedom of the Israelites came at a cost and that, regardless of the assignment of guilt, we ought to feel a loss.