“So Joseph recognized his brothers” (Genesis 42:8)—when they fell into his hand; “but they did not recognize him”—when he had fallen into their hand. David said, “Give ear, O Shepherd of Israel, who leads Joseph like a flock” (Psalms 80:2). Thus did Rabbi Tanchuma expound: “Go down (redu) there”—for he saw that they would go down and be enslaved in Egypt two hundred and ten (RD"U) years. Another interpretation: “Go down (redu)”—to teach you that whoever buys produce from the marketplace, it is a going down for him. “And Joseph’s ten brothers went down”: it is not written here “the children of Israel,” but rather “Joseph’s brothers,” because at first they did not act toward him with brotherhood, in that they sold him; and in the end they regretted it, and said, “When shall we go down to Egypt and return Joseph to our father?” And when their father told them to go down to Egypt, they all went of one mind to bring him back. Therefore it is written, “And Joseph’s brothers went down.” And why ten? Because it was within their power to bring the punishment to an end and to annul the decree. Thus you find with Sodom that Abraham went down from fifty to ten; and once he did not find ten, Abraham the Righteous fell silent. And because there were not ten in the generation of the Flood, they were not saved, for there was no one there except Noah and his three sons and their wives—that is, eight.
Why Joseph's Ten Brothers Went Down to Egypt to Buy Grain
Midrash Tanchuma Buber, Miketz 10:2
ויכר יוסף את אחיו, כשנפלו בידו, והם לא הכירוהו, כשנפל בידם. אמר דוד רועה ישראל האזינו נוהג כצאן יוסף (תהלים פ ב) כך דרש ר' תנחומא רדו שמה שראה שיורדים ומשתעבדים במצרים רד"ו שנים. ד"א רדו ללמדך שכל הלוקח תבואה מן השוק ירידה היא לו. וירדו אחי יוסף עשרה, בני ישראל אין כתיב כאן, אלא אחי יוסף, לפי שמתחילה לא נהגו עמו אחוה שמכרוהו ולבסוף נתחרטו, ואמרו אימתי נרד למצרים ונחזור את יוסף לאבינו, וכשאמר להם אביהם לירד למצרים הלכו כולם בדעת אחת להחזירו, לכך כתיב וירדו אחי יוסף, ולמה עשרה, שהיה בהם לכלות את הפורענות ולבטל את הגזירה, לכך אתה מוצא בסדום שירד אברהם מחמשים עד עשרה, כיון שלא מצא עשרה, שתק אברהם הצדיק, ולפי שלא היו בדור המבול עשרה לא נוצלו, כי לא היה שם אלא נח ושלשה בניו ונשותיהם דהיינו שמונה.