Nothing happens in a vacuum, and the underlying reasons for this unfortunate outcome are multifarious in nature.
One of several reasons involves the social influence of capitalism. It is very Darwinian in nature, and it pits people against one another. As financial resources and opportunities grow scarce, it gets amped up and even turns into what might be characterized as rogue capitalism, where the acquisition of more money, by any means, is the sole concern of the most able and opportunistic.
Another, which directly underlies your criticism of the Internet as a divisive force (insofar as it helps facilitate tribal-like separatism), rests with the practice of pushing multiculturalism as a social philosophy. While it’s conceivable that it could have brought about cross-cultural/political tolerance and understanding (much as one might have hoped to derive from the Internet), it seems to have instead motivated an acute focus on emphasizing our differences and the potential perils associated with having them. People were/are naive to the double-edged sword possibilities of pushing multiculturalism —and in this case the advent of the Internet merely amplified the divisiveness side of multiculturalism rather than the inclusion side.
The huge leap from teaching assimilation to teaching multiculturalism created a social fault line that possibly could have been avoided if we had chosen to teach cultural pluralism instead. It’s a hybrid of assimilation and multiculturalism, and the USA had already been moving in this direction on its own accord (organically, even though people didn’t necessarily realize it) until someone (probably some academics) decided multiculturalism would be better (bear in mind, multiculturalism never has been clearly established in policy at the federal level).
In reality, the USA crapped on its own national identity when it started teaching multiculturalism. Unlike cultural pluralism, which encourages people to preserve elements of their native identity as long as it recognizes a dominant national identity — the common good — as superseding it, multiculturalism (as a philosophy) doesn’t entertain an explicit national identity component. Whereas the former encourages inclusiveness, the latter promotes tolerance. Inclusiveness and tolerance are very different goals. The former banks on unity via inclusion, the latter runs the risk of creating divisions by focusing on differences and the perceived slights they engender.
There are more reasons for today’s current state of affairs, but these two alone go a long way toward explaining how we got here.