ואת העם העביר אתו לערים מקצה גבול מצרים ועד קצהו.
And as for the people, he moved them into the cities, from one end of the borders of Egypt to the other end.Click here to read moreThis displacement of vast numbers of people is perplexing. The Gemara (Chullin 60b) explains that he did it so the Egyptians could not call the Jewish people "exiles", since they were all displaced. Rashi (Gen. 47:21) expands on this, that his intent was to remove shame from his brothers. He resettled the Egyptians in order to protect his brother's honors.
The Keli Yakar (ad loc.) asks an question whose importance is only eclipsed by the answer: How is that moral? How could Yosef force so many people to leave their homes just to protect his brothers? This seems quite morally problematic.
The Keli Yakar reframes the earlier explanations as follows. Yosef was trying to teach the Egyptians an important lesson, to instill in them the need to empathize with strangers. It is part of human nature to fail to understand the plight of the outsider, the people who are lacking support structures and contacts within the system. Such people are easily oppressed, even unintentionally. Therefore, Yosef displaced the Egyptians so they all learn what it is like to be an outsider. This, he hoped, would prevent them from oppressing the recent immigrants. Sadly, it failed.
We, today, also need to learn this lesson of helping the oppressed, the strangers and outsiders. When we fail to adequately help them, we run the risk of God having to teach us that lesson the hard way.