That’s giving the algorithms too much credit. They don’t encode user desires they encode user engagement bait. Like everything under our capitalist system the motivation is profit: in this case ad revenue. Sometimes positive things or agreeable things drive engagement, sometimes negative or divisive things. As long as users spend time scrolling on the platform they’ll both be given equal weight.
As with anything profit motive driven it’s just about what makes more money not what makes more sense or what makes better outcomes. The core assumption of capitalism (at least how it’s sold) is that profit causing activity correlates with improvements to human well-being. How anyone still believes that, I’m not sure.