1. We are all, at heart, covetous xenophobic apes, and we've been doing the same basic thing (arbitrarily define an in-group and an out-group and proceed to wage total war on the out-group) since before we were even human. This is just the latest iteration of the thing we've always done.
2. For more than a decade now, people have been spending fortunes building platforms and algorithms that rely on ever-increasing user 'engagement', often without really knowing what that is. As it turns out, conflict is the most engaging kind of engagement. Twitter especially is a machine for conflict - it funnels anger-inducing information to the user and makes it trivial to strike back at the source of the anger. I really don't think anybody did this on purpose, but it's what we ended up with.