Enemies Join Forces

"Let's put aside our differences immediately and treat our multiple years-old hatred like it's nothing because!"

No matter how much two people would seem to hate each other, the Common Threat always seems to be more important than the two killing the other. It might be because the Common Threat has a plan that affects many while the two smaller enemies have plots that don't do as much damage. An instance of this would be the Common Threat plotting to corrupt the world while the Hero and Villain only want to defeat the other. There might still be some tension between the enemies, but it all wears out eventually and they become friends.

This is how the Allied Enemy becomes friends with the Hero. They might join because they have something in common, decide that being enemies will get them nowhere, or that they'd be best at the side of the other.