I don't think the social media companies' algorithms are entirely to blame. But more broadly it's centralized moderation of public online spaces.
Moderation of public behavior of physical spaces was only necessary because it wasn't possible to selectively filter people's influences on eachother in public. If someone is doing something you don't want to see in public, covering your eyes is not good enough because you also block out the people you do want to see. Centralized moderation was a practical half-measure rather than an ideal solution for a democratic society that values free expression and self-determination.
That kind of moderation isn't necessary online because all filters can be implemented client-side. We just aren't doing it because people are so used to the old way. But the old way will naturally lead to more and worse conflict when we have infinite connectivity.