Because of targeted social networks circles. The candidate to prop got a radicalized base, the candidate to lose got messaging that either indicated people should disengage ("Genocide Kamala!") or were given the same sort of messaging in 2016 that made Hillary such a surefire win you didn't even have to go to vote, because what's one more vote (appeal to laziness). Cambridge Analytica's successors were also armed with LLM AI as well as Big Data personal data identification this time around.
They clearly prepped up in case the votes didn't go their way, but the post- truth politics paired with people who consider their social network fueled emotions more credible than the facts and merits of lifetime experts was more effective than they could have ever predicted, and this will mark the tendency for all future elections in our "democracies" were education clearly has had no long term impact.
Democracy fails when most people, rather than being informed are stuck in their social network bubble ruts. Democracy fails when nothing is done to fight disinformation in social networks. Democracy fails when the most popular social networks can be bought up by the richest man to be used for electoral interference without any repercussions. Democracy fails when it elects convicted felons. The US is too far gone, and is too powerful and influential for any peaceful transition from those countries that didn't want to be enshittified.