Now you have to explain why an alliance of tens of thousands was formed to support a few thousand foreigners.
I don't think there's a single and simple answer. One thing that Cortez managed to do was "demystify" the mighty Aztecs in the eyes of the people conquered and supressed by the Aztecs.
There was unrest and violence in the region long before Cortez arrived on the scene, when he did he was the external catalyst to ignite the powder keg. When reading accounts of the conquest, information gathering, political scheming and negotiations were often more "decisive" than the actual fighting.
Maybe the Aztecs were seen as bloodthirsty oppressors, and the Spanish as a chance to liberate from the yoke of Aztec empire?
You have to make the evil claim: that the Spanish invaders were seen as a better alternative to the indigenous Aztecs by at least a decent majority of the population (and then, later, the Inca) (maybe this even explains the final end of the Maya)
Which is both likely true and morally against what we currently seem to believe.
Divide and conquer is as old as time. Any major power usually got there by unsavoury means, making a lot of enemies along the way. The same thing happened in the US and Canada, where tribes that had fought for centuries -- quite contrary to the noble tropes, it wasn't some big love-in, and the continent was littered with raping, pillaging, slavery, and so on -- so they were more than happy to faction off to opposing sides if it gave them more of an ability to exterminate their nemesis.
There's no mystery here. The Aztecs ruled brutally over dozens of other indigenous groups, they practised slavery and human sacrifice. When the Spanish showed impressive military equipment and the implication (when reinforcements arrived, albeit in small numbers) that they represented a powerful external military force, ancestral opponents who'd been subjugated by the Aztec empire were quick to throw in their lot.