Character Analysis
In A New Hope, C-3PO and R2-D2 were our gateways into the Star Wars universe. This was a deliberate choice: Lucas created these characters as audience stand-ins of a sort, placing them in every scene so we always have something to hold on to.
Because of this, their separation in The Empire Strikes Back—R2 cruising with Luke and C-3PO chilling with Team Falcon—reflects the fate of our heroes as a whole. In other words, by separating the two most inseparable characters from the first film, Lucas is emphasizing that the Rebel Alliance is in a desperate, scattered state.
R2-D2, everyone's favorite vaguely soccer-ball looking droid, ends up chilling with Mr. Skywalker on Dagobah. Well, maybe "chilling" is a loose term: He's pretty reluctant to go to Dagobah in the first place, and spends the flight bleeping and blooping about whether or not it's a safe planet for droids.
It's not.
Immediately after crash landing in the swamp, R2 falls in the murky water and is promptly eaten by a swamp thing. Lucky for our favorite droid, though, he tastes terrible and is spit out again. Oh, the humanity!
Being swallowed by a swamp thing and puking up mud doesn't keep our R2 down for long. (Neither does Yoda beating on him.) He's as plucky and resourceful as ever: He repairs Luke's X-wing, flies to Cloud City, and repairs the Millennium Falcon's hyperdrive… after reconnecting with his platonic lifemate C-3PO, of course.