Though slaying the dragon was never part of the bargain; he just had to recover the princess (normally he'd have to slay the dragon, but this time he just outwits her).
Also, she comes to help because Donkey, who she loves, asks her to.
In the first Toy Story, Woody and Buzz are initially bitter enemies due to Woody's jealously over Andy's affection, but when the two toys end up separated from the rest of the group, they must work together in order to get back home. They then become good friends for the rest of the trilogy.
In the Futurama movie "Bender's Big Score", not only is the Robot Devil providing music at Leela's abortive wedding, but they later team up with the robot mafia and evil robotic Santa to take Earth back from the scammer aliens.