One of the coolest things that can happen in an anime is when two former enemies join forces to achieve a common goal. Often, this happens when a villain decides to put aside their villainous ways and join the good guys - that's what happens when Sasuke decides to help Naruto take down Madara in Naruto. But at other times, it's merely a temporary truce - Hisoka from Hunter x Hunter has no desire to side with Gon and Killua for any longer than is convenient for him.
Whether these hero/villain alliances are heartwarming or awesome, they offer a new lens through which to look at both characters, and a rare opportunity to see two very different characters cooperate.
Goku & Frieza Take Down Jiren In 'Dragon Ball Super'
Goku is an unabashedly heroic person who lives to fight evil. Frieza blows up entire planets because he can. One would never expect these two to see eye to eye on anything, but by the end of the Tournament of Power they're both completely on board with defeating their mutual enemy, Jiren, and saving multiple universes in the process. Frieza happens to be dead at the moment, so part of the reason he's helping his former arch enemy out is that Goku promised to bring him back via Dragon Ball. The ensuing fight is one of the most dramatic of any the franchise has ever seen.
Envy, Ed, & Ling Escape Gluttony's Stomach In 'Fullmetal Alchemist: Brotherhood'
Ed and Ling doesn't exactly want to help out a homunculus, and the homunculus in question isn't particularly interested in helping them. But despite their animosity for one another, they join forces temporarily in order to take down a mutual opponent - Gluttony's stomach. The three of them have been swallowed by Envy's partner in crime, and none of them have the strength or knowledge to escape on their own. It's only through working together that they manage to leave that labyrinth - but they're still enemies when it's over, thank you very much.
Crocodile & Luffy Team Up To Escape Prison In 'One Piece'
When Luffy and Crocodile are both being held in Impel Down, a maximum security underwater prison, they decide to join forces to figure out a means of escape. Though these two used to be enemies, the desperation of their situation forces them to put aside their differences and work together. This isn't the last time that the two former enemies will pair up either - later when Luffy has to fight the Marines, Crocodile is right by his side - he even saves Luffy's brother Ace's life.
Despite Crocodile's newfound willingness to help, he refuses to straightforwardly admit to being on Luffy's side - rather, he's just doing it so that the Marines will lose.
Inuyasha & Sesshoumaru Defeat Naraku In 'Inuyasha'
Inuyasha and Sesshoumaru are locked in a bitter feud throughout most of the series. Sesshoumaru loathes his half-human brother not only because he isn't a full demon, but also because he's jealous that their father gave Inuyasha what he perceives to the be a superior sword. The two fight more than once, and at some point Sesshoumaru teams up with Naraku to take Inuyasha down.
But as the series progresses, Sesshoumaru becomes disillusioned with Naraku, especially when he attempts to kidnap Rin, a human child who he has grown affectionate toward. For this and many other reasons he decides that Naraku needs to be taken down. In the final battle of the series - which ends in Naraku's defeat - Sesshoumaru finally puts aside his resentment toward his brother and works with him and his team to take down their mutual enemy.