The deeds, the punishment, the covenant, the tower, the tower's punishment - it's the acts of a capricious God. The Torah in Genesis end of ch. 6 says that "vayinachem", God reconsidered His creation of man, who were all behaving with incredible evil. His response? Wipe out all humans, and all animals, with the flood. Who is his messenger? Noah - the most righteous of his generation, but he never once in 120 years of construction goes out and tells anyone why he's building this ark. God tells Jonah to bring his message of doom and repentance, but He doesn't tell Noah anything.
So after God brings this flood, without really giving Mankind a chance to repent, he then says to himself, "I don't think I should do this again."
We have God saying "it was a mistake to create humanity, and I'm going to wipe them out and start again." Then after doing so, "it was a mistake to be so draconian, I'm not going to do that again," and when confronted with an anti-God threat, at Babel, comes up with a less-drastic punishment.
It's a classic repentance tale, except that God is the actor, not the receiver of the repentance. He does something wrong (the Flood), he regrets, decides not to do it again, and when again presented with a threat, goes through with his promise not to do so again. Is that it? Did all those people die so that God could make an example of repentance?
I guess part of it depends on how literally you take the story. If you're willing to take it all as an allegory, the repentance-tale explanation works. If you need the Bible to remain literal, taking Rashi's dictum of "the text does not depart from its literal meaning" as applying to the whole Torah, including the narratives, then you are faced with this arbitrary God. It's like we're expecting God the Great and Powerful, and we get God the charlatan from the Kansas state fair, who doesn't know how to turn the balloon around.
Maybe it's just that our usual medieval paradigms of God, whether of the Philosophers or of the Kabbalists, as omniscient and omnipotent, just don't fit a narrative that was written to be understood by the Israelite exiles from Egypt, 3300 years ago. Maybe there's some other message here. But if we are forced to take the narrative literally (even leaving aside the issues of geological evidence of a global flood), it still makes no sense in terms of contemporary God-ideas.
Men starbt nisht fun a kashye, one doesn't die from a question, but it seems a fairly obvious one, surely it has been addressed in our 3300 years of literary history.