{Bereishis 6:18}
“…and you shall enter the ark – you, your sons, your wife, and your sons’ wives with you.”
Rashi comments: “The men separately, and the women separately. From here we learn that they were forbidden to have relations.”
A handful of pesukim later the Torah describes Noach and his family entering the ark.
{Bereishis 7:7}
“Noach, and his sons, and his wife, and his sons’ wives with him, went into the ark because of the waters of the flood.”
Rashi comments: “The men separately, and the women separately, because they were forbidden to have relations, for the world was in a state of distress.”
(A) Why is it necessary for Rashi to repeat himself?
(B) Why does Rashi supply the reason (“for the world was in a state of distress”) only in his second comment, and not initially?
Maybe the second Q answers the first Q. First passuk is the command of Hashem. Second is the fullfillment of that command. However, Rashi adds a reason – they didnt go in that order bc of the command. Rather they did it for the world was in distress. Efsher?