Foil
MoreFoil
Character Role Analysis
WALL-E & The Captain
Both WALL-E and the Captain have goals that don't involve the plant. WALL-E just wants to get EVE to fall in love with him. The Captain, well, he just wants to sleep and eat all day. But both characters end up on a mad dash (or in the Captain's case, a mad sit and wait) for the plant for similar reasons: to return to Earth.
The Captain initially doesn't want the plant because that means his sedentary lifestyle will be over. But when he researches Earth, and learns about farming and dancing, he wants to go to there. The love the Captain feels for Earth is similar to WALL-E's love for EVE. Because their goals align, albeit for different reasons, they're able to team up. D'awww.
EVE & M-O
Similar to WALL-E and The Captain, EVE and M-O both have a single-minded focus that they end up changing in favor of WALL-E.
M-O's is the less complex of the two. A tiny robot like him can't be that complicated. When he sees WALL-E, he abandons all his directives in order to track him around the ship and clean him good. By the time he does, he and WALL-E introduce themselves to each other, and a bizarre little friendship is born.
EVE, on the other hand, ends up falling hard for our plucky little trash compactor, and decides to abandon her directive instead of abandoning WALL-E.