Tower of Babel: What was the sin?
וַֽיְהִ֥י כָל־הָאָ֖רֶץ שָׂפָ֣ה אֶחָ֑ת וּדְבָרִ֖ים אֲחָדִֽים׃ וַֽיְהִ֖י בְּנָסְעָ֣ם מִקֶּ֑דֶם וַֽיִּמְצְא֥וּ בִקְעָ֛ה בְּאֶ֥רֶץ שִׁנְעָ֖ר וַיֵּ֥שְׁבוּ שָֽׁם׃ וַיֹּאמְר֞וּ אִ֣ישׁ אֶל־רֵעֵ֗הוּ הָ֚בָה נִלְבְּנָ֣ה לְבֵנִ֔ים וְנִשְׂרְפָ֖ה לִשְׂרֵפָ֑ה וַתְּהִ֨י לָהֶ֤ם הַלְּבֵנָה֙ לְאָ֔בֶן וְהַ֣חֵמָ֔ר הָיָ֥ה לָהֶ֖ם לַחֹֽמֶר׃ וַיֹּאמְר֞וּ הָ֣בָה ׀ נִבְנֶה־לָּ֣נוּ עִ֗יר וּמִגְדָּל֙ וְרֹאשׁ֣וֹ בַשָּׁמַ֔יִם וְנַֽעֲשֶׂה־לָּ֖נוּ שֵׁ֑ם פֶּן־נָפ֖וּץ עַל־פְּנֵ֥י כָל־הָאָֽרֶץ׃ וַיֵּ֣רֶד יְהוָ֔ה לִרְאֹ֥ת אֶת־הָעִ֖יר וְאֶת־הַמִּגְדָּ֑ל אֲשֶׁ֥ר בָּנ֖וּ בְּנֵ֥י הָאָדָֽם׃ וַיֹּ֣אמֶר יְהוָ֗ה הֵ֣ן עַ֤ם אֶחָד֙ וְשָׂפָ֤ה אַחַת֙ לְכֻלָּ֔ם וְזֶ֖ה הַחִלָּ֣ם לַעֲשׂ֑וֹת וְעַתָּה֙ לֹֽא־יִבָּצֵ֣ר מֵהֶ֔ם כֹּ֛ל אֲשֶׁ֥ר יָזְמ֖וּ לַֽעֲשֽׂוֹת׃ הָ֚בָה נֵֽרְדָ֔ה וְנָבְלָ֥ה שָׁ֖ם שְׂפָתָ֑ם אֲשֶׁר֙ לֹ֣א יִשְׁמְע֔וּ אִ֖ישׁ שְׂפַ֥ת רֵעֵֽהוּ׃ וַיָּ֨פֶץ יְהוָ֥ה אֹתָ֛ם מִשָּׁ֖ם עַל־פְּנֵ֣י כָל־הָאָ֑רֶץ וַֽיַּחְדְּל֖וּ לִבְנֹ֥ת הָעִֽיר׃
Everyone on earth had the same language and the same words. And as they migrated from the east, they came upon a valley in the land of Shinar and settled there. They said to one another, “Come, let us make bricks and burn them hard.”—Brick served them as stone, and bitumen served them as mortar.— And they said, “Come, let us build us a city, and a tower with its top in the sky, to make a name for ourselves; else we shall be scattered all over the world.” The LORD came down to look at the city and tower that man had built, and the LORD said, “If, as one people with one language for all, this is how they have begun to act, then nothing that they may propose to do will be out of their reach. Let us, then, go down and confound their speech there, so that they shall not understand one another’s speech.” Thus the LORD scattered them from there over the face of the whole earth; and they stopped building the city.
רבי פנחס אומר לא היו שם אבנים לבנות את העיר ואת המגדל מה היו עושין היו מלבנים לבנים ושורפין אותן כיוצר חרש עד שבנו אותו גבוה שבעים מיל ומעלות היו לו ממזרחו וממערבו אלו שהיו מעלין את הלבנים היו עולים ממזרחו ואלו שהיו יורדין היו יורדין ממערבו ואם נפל אדם ומת לא שמי' את לבם עליו ואם נפלה לבנה אחת היו יושבין ובוכין ואומרין אוי לנו אימתי תעלה אחרת תחתיה.
Rabbi Phineas said: There were no stones there where-with to build the city and the tower. What did they do? They baked bricks and burnt them like a builder (would do), until they built it seven mils high, and it had ascents on its east and west. (The labourers) who took up the bricks went up on the eastern (ascent), and those who descended went down on the western (descent). If a man fell and died they paid no heed to him, but if a brick fell they || sat down and wept, and said: Woe is us ! when will another one come in its stead?
וְנֶחְלְקוּ לְשָׁלֹש כִּתּוֹת, אַחַת אוֹמֶרֶת נַעֲלֶה וְנֵשֵׁב שָׁם, וְאַחַת אוֹמֶרֶת נַעֲשֶׂה עִמּוֹ מִלְחָמָה, וְאַחַת אוֹמֶרֶת נַעֲלֶה וְנַעֲבֹד שָׁם עֲבוֹדָה זָרָה. זוֹ שֶׁאָמְרוּ נַעֲלֶה וְנֵשֵׁב שָׁם, מִשָּׁם הֱפִיצָם ה'. וְזוֹ שֶׁאָמְרוּ נַעֲלֶה וְנַעֲשֶׂה עִמּוֹ מִלְחָמָה, נַעֲשׂוּ קוֹפִין רוּחִין וְשֵׁדִין. וְזוֹ שֶׁאוֹמֶרֶת נַעֲבֹד שָׁם עֲבוֹדָה זָרָה, בִּלַּע ה' פִּלֵּג לְשׁוֹנָם, שֶׁנֶּאֱמַר: וַיָּפֶץ ה' אֹתָם מִשָּׁם.
They separated into three groups. One said: “Let us go and dwell there”; the second insisted: “Let us go up and wage war against Him”; and the third shouted: “Let us go and serve idols there.” Those who said “Let us go and dwell there” were scattered abroad by the Holy One, blessed be He; those who insisted “Let us go and wage war against Him” were transformed into apes, spirits, and demons; and those who said “Let us go and serve idols there” were punished, as specified in the verse Destroy, O Lord, and divide their tongue (Ps. 55:10). Thus it is said: And the Lord dispersed them from there (Gen. 11:8).
(א) שפה אחת. לְשׁוֹן הַקֹּדֶש: (ב) ודברים אחדים. בָּאוּ בְעֵצָה אַחַת וְאָמְרוּ לֹא כָּל הֵימֶנּוּ שֶׁיָּבֹר לוֹ אֶת הָעֶלְיוֹנִים, נַעֲלֶה לָרָקִיעַ וְנַעֲשֶׂה עִמּוֹ מִלְחָמָה. דָּבָר אַחֵר עַל יְחִידוֹ שֶׁל עוֹלָם. דָּבָר אַחֵר וּדְבָרִים אֲחָדִים – אָמְרוּ אַחַת לְאֶלֶף ותרנ"ו שָׁנִים הָרָקִיעַ מִתְמוֹטֵט כְּשֵׁם שֶׁעָשָׂה בִּימֵי הַמַּבּוּל, בֹּאוּ וְנַעֲשֶׂה לוֹ סְמִיכוֹת (ב"ר):

(1) שפה אחת ONE LANGUAGE — The Holy Tongue (Hebrew) (Midrash Tanchuma, Noach 19). (2) ודברים אחדים AND ONE SPEECH — They came with one plan, saying: “He has no right to select the heavenly regions exclusively for Himself; let us ascend to the skies and make war upon Him”. Another explanation (of דברים אחדים which is taken to mean “words referring to “One”): words regarding the Sole Being (God) in the Universe. Another explanation of ודברים אחדים is: they spoke דברים חדים “sharp” words; they said, “Once in every one thousand six hundred and fifty six years (the period that elapsed from the Creation to the Flood) there is a heaven-shaking, just as there was in the days of the Flood. Come. then, and let us make supports for it” (Genesis Rabbah 38:6).

(א) הבה נבנה לנו עיר. לפי הפשט מה חטאו דור הפלגה? אם מפני שאמרו "וראשו בשמים", הא כתיב (דברים א, כח) "ערים גדולות ובצורות בשמים". אלא לפי שציוום הקב"ה (בראשית א, כח) "פרו ורבו ומלאו את הארץ", והם בחרו להם מקום לשבת שם, ואמרו "פן נפוץ". לפיכך הפיצם משם בגזרתו.
(1) הבה נבנה לנו עיר, according to the plain meaning and the commonly held opinion that the people of that time were punished for their grandiose plan of building a Tower which was meant to reach the heaven, what are we to make of Deuteronomy 1,28 in which Moses described cities of the Canaanites as having walls as high as the heaven? Why were these walls not destroyed by G’d? We must revise our opinion of why the people were punished, and accept that their principal sin was in not fulfilling G’d’s basic directive to be fruitful, to multiply, and to populate the whole earth, not just a small valley. Their declared objective had been not to scatter (verse 4) The fact that G’d forcefully scattered them afterwards shows that their sin must have been their failure to do so voluntarily.

וע"ד השכל ונעשה לנו שם, היו אנשי הפלגה רשעים משכילים בכל חכמה ועשו העיר והמגדל כדי להנצל מהמבול של אש, מפני שכבר ראו אבדון העולם במבול של מים, פחדו לנפשם והוצרכו לעשות בנין מקום שאם ירצה להביא מבול של אש ולשרוף את העולם שינצלו מהם ולא תקרב האש בגבולם....ולקשור חלק מיסוד האש שלא יוכל להתקרב אל העיר, כשם שמצינו אף בדורנו זה קצת החכמים שיודעים כח לקשור חלק אחד מן הברק. [והוא הידוע כעת בשם "דאננעראבלייטער" ונמצא רושם מזה גם בתוספתא שבת פ"ז]

Looking at this story from a rational point of view, the words “and let us make a name for ourselves,” must be understood thus: the people of that generation were very advanced in matters of philosophy and even technology. However, they used their intelligence in a sinful manner. They constructed the city and tower to protect themselves against a deluge of fire, seeing that God had promised not to again bring a deluge of water....They tried to isolate and tame the power of fire in order to neutralize its deadly effect so that it could not engulf their city, as we have found also in our generation that some scholars [scientists] know how to harness some of the strength of lightning. [Editorial note by translator, R. Eliyahu Munk (1998): This is know in our time as "lightning rod," and we can find a mention of this also in Tosefta Shabbat, Chapter 7.]

ודברים אחדים. לא ביאר הכתוב הדברים אלא ברמז כמבואר במדרשים אבל לא פירשן הכתוב כי אם שהיו דברים אחדים וללמדנו דלא משום הדברים התעורר הקב״ה. כי אם בשביל שהיו אחדים. יהיו מה שיהיו. ודבר זה אם כי לפי הנראה אין בזה שום עון ואדרבה חבור עצבים ג״כ ראוי להניח. אבל כאן גרם לחשוב דבר שיצא לתקלת הישוב כאשר יבואר:

...And the same words - The text did not explain what those words were, rather, it leaves as a hint, as explained in midrashim. But the words themselves are not explained by the text, it just tells us that they were the same words, to teach us that it wasn't because of the content of the words themselves that the Holy One of Blessing was distressed. ... here what happened is that all thought the same thing, and this came to be the problem of the settlement.

וראשו בשמים. זה ודאי לא יעלה עה״ד שיהיה עיר אחת לכל העולם אלא כסבורים שיהיו כל הערים סמוכות וטפלות לאותו העיר שבה המגדל ויהיה המגדל לצפות ממנו למרחוק אחר כל הישוב שלהם שלא יהיו נפרדים בארץ אחרת. ע״כ נצרך שיהיה ראשו בשמים.
And its top in the sky - It is obvious that you should not think that this would be one city to the whole world, rather they thought that the other nearby cities would be subjects to that city that had the tower, that they would be able to see from it to the distance, over all their settlement, so that no one would be able to separate themselves and go to another land. That's why they needed its top reaching the sky.