You may have heard that cockroaches and Twinkies are the only things that would survive an apocalypse. In WALL-E, humans have left Earth, but cockroaches survive. Early in WALL-E, a little cockroach emerges from a can and becomes WALL-E's companion.
The cockroach rides on WALL-E as he does his duties. He alerts WALL-E to his ruined tread and, as a reward, WALL-E feeds him a Kremies, the Buy-N-Large version of Twinkies (because the true tragedy of WALL-E is that Twinkies did not survive) WALL-E takes care of the cockroach like a beloved pet, and he's sad when he accidentally squishes him. Of course, that barely hurts the cockroach. He even gets blasted by EVE's energy cannon and is fine.
It's actually the cockroach that brings EVE and WALL-E together, like a little creepy ambassador of goodwill. EVE, who's quick on the trigger with her cannon, doesn't blast WALL-E anymore when she sees that the cockroach likes him too.
When WALL-E leaves Earth, one of the last things we see is the cockroach watching the spaceship fly away, and the cockroach is the first thing we see when the Axiom returns. He also gives us one of the movie's saddest moments—after WALL-E is rebuilt (but doesn't remember anything) WALL-E rolls over him and, coldly, keeps going.
Of course, EVE's love brings back WALL-E's memories, and the two hold hands. When they do, the cockroach is right there, on EVE's shoulder. Hey, it's gross… but it's also sweet!