People thought that heaven was close enough that they could build a tower to reach it. Shows the state of knowledge of the universe at that time.
On the other hand, all powerful, all knowing, loving God thinks that they just might do it so he inflicts them with new languages and sends them packing. Of course we learned that the sons of Adam? Noah? were already dispersed to different lands with their different tounges.