This is not a science topic as much as it is a history lesson. The reason why God mixed the languages was for the reason that mankind need to disperse and spread out through the world. What happened is a man called Nimrod attempted to bring the whole population of the world at that time together and unite them in idolatry. Well, this is evil to God and God would not allow man to have that kind of control over other people. That kind of control will happen in the end, when the AntiChrist attempts to unite the world against God. Nimrod is Babylon 1, while the AntiChrist follows after Nimrod's Babylon. What happened at Babel is a fact and well supportted in history andn archaeology.
God came and confused the language of the people in Shinar (or, "Sumer") at the time, these people began ton freak out because they could no longer speak the common language anymore. Hence the language tree was born.