"Now Hebron was built seven years" etc. (Numbers 13:22) — <this is stated> to make known the praise of the Land of Israel, that its refuse is more excellent than the land of Egypt. For at the time when the children of Noah inherited the world after the Flood, they built towns first, and not in the place of excellence, but rather they chose the refuse of the Land [of Israel, and Hebron is the refuse of the Land of Israel]; and Zoan is the best place in the land of Egypt, and this one preceded it by seven years. If you should say, "No — the one who built this one did not build that one," <the answer is:> it is the <same> generation, it is the <same> family, "and the sons of Ham: Cush and Mizraim and Put and Canaan" (Genesis 10:6); and one arose and built this one before that one. So Hebron was built seven years before Zoan of Egypt.
Why Hebron's Worst Soil Surpasses Egypt's Finest Zoan
Midrash Tanchuma Buber, Sh'lach 14:1
וחברון שבע שנים נבנתה וגו' (שם שם כב). להודיע שבחה של ארץ ישראל, שהפסולת שלה משובח מארץ מצרים, שבשעה שנחלו בני נח את העולם אחר המבול, הם בנו עיירות תחלה, ולא במקום השבח, אלא בחרו את הפסולת של ארץ [ישראל, וחברון פסולת של ארץ ישראל], וצוען היא הטובה שבארץ מצרים, וזו קדמה לה שבע שנים, אם תאמר לא מי שבנה זו לא בנה זו, הוא הדור היא המשפחה, ובני חם כוש ומצרים ופוט וכנען (בראשית י ו), ועמד ובנו זו לפני זו, וחברון שבע שנים נתנתה לפני צוען מצרים.