I think the most charitable explanation for this is that it's because polarizing content (aka ragebait) gets views/plays, which the ranking algorithms directly optimize for.
Also, this isn't a new phenomenon. If you're interested, I'd recommend reading Shoshana Zuboff's 2018 book: The Age of Surveillance Capitalism.