At the end of Parashat Vayechi, the brothers send a message to Yosef saying, “Your father commanded before he died, to tell Yosef, ‘Please forgive your brothers for their sins etc.‘“
But the Midrash Tanchuma says, in Parashat Vayechi,
“We searched and we didn’t find that Yaakov said this. From this we can see how powerful peace is, that God wrote the power of Shalom.”
In other words, Yaakov never actually gave this command. Yaakov did not suspect Yosef of not forgiving his brothers, nor of doing anything wrong.
But the brothers were afraid that Yosef might be upset at them and show his anger after their father had died.
Therefore, they created a story. One might think that this is lying, that it was improper for them to create a story like that. Therefore, the Torah tells us not to make that mistake. Sometimes you are allowed to bend the truth for shalom.
The original source for this is Avraham and Sara. Sara told Hashem that her husband was old, but God change the wording to say that she said she was old. So God Himself changed the story, for the purpose of shalom.
God is a God of truth and yet He changed it.
So too, here, the Torah is teaching us the same with the brothers.
Why does the Torah see fit to teach us the same lesson twice? Because one might think that Shalam Bayit/ peace in the home between husband and wife is extremely important. As it says, God’s name is erased to bring shalom bayit to the home. But we don’t find that you would erase God’s name to get along with your brother.
So people might wonder whether peace among the extended family is as important as among husband and wife. They might ask, Can we also change the truth for brotherly love?
Therefore, we have this additional lesson, at the end of Parashat Bereshit, teaching us that brotherly love is so important that you can change the truth, in order for brothers to stay at peace.

