Rabbeinu Bachya asks, “Why does Yosef dismiss his brothers at the end of this Parsha by saying, ‘Go up in peace to your father,’ as opposed to a simple, ‘Go in peace?’” He answers that Yosef’s statement foreshadows the death of the ten great rabbis who “went up peacefully to their fathers.” The ten rabbis were punished because Yosef’s ten brothers sold him into slavery.
Yosef’s brothers took his coat and tricked Yaakov into thinking that Yosef had been killed, so when Yosef really died Bnai Yisrael lost the “coats of their souls,” their bodies, by being forced into slavery in Egypt. Later, the Roman emperor Lupinus decreed that ten people had to be held responsible for the kidnapping of Yosef, and these ten rabbis were killed because the prohibition against kidnapping mandates a punishment of death (וגונב איש ומכרו מות יומת).
Rabbeinu Bachya also interprets Yosef’s giving his brothers’ money back as an indication of their wrongdoing. He explains that when Yosef says שים כסף איש בפי אמתחתו, “Place each man’s money in the opening of his sack” (44:1), he is indicating that his brothers’ souls (“money”) had been separated from their bodies (“sacks”), and the two parts needed to be reunited.
Rabbeinu Bachya then explains the actions of Lupinus. Just as a ram was sacrificed in Yitzchak’s place at the Akeida, the ten rabbis replaced Yosef’s brothers for punishment. We can learn from here that children can be held accountable for their parents’ sins if the children continue in their parents’ evil ways. However, the opposite is true as well. When King David attacked Amalek, Rashi explains, 400 Amalekim were able to escape because 400 people had chosen to leave Esav instead of staying with him to fight Yaakov. Thus, people can also benefit from the actions of their ancestors. This is what we mean when we mention the Avot in the first paragraph of Shemoneh Esrei: it is because of their actions years ago that our prayers are answered today.