- R2 and C3P0 happen to land somewhere conveniently on the side of the planet where Luke is
R2 piloted the escape pod to the location Leia told him to go. The escape pod was navigable, unlike the TIE fighter Poe and Finn were in in TFA
That was never established in the film. Nice rationalization though.
Sorry to come back to this point so late. Here it is, straight from the official 1976 novelization of the original script:
Artoo’s seemingly random manipulation of the pod controls promised anything but a smooth landing, however. Threepio regarded his squat companion with concern. “Are you sure you know how to pilot this thing?”
Original script or nay it matters not because the script has been revised and it mentions nothing about R2 piloting anything. I’m just going on what’s presented in the film and the official script.
INT. IMPERIAL STARDESTROYER
On the main viewscreen, the lifepod carrying the two terrified
robots speeds away from the stricken Rebel spacecraft.
CHIEF PILOT
There goes another one.
CAPTAIN
Hold your fire. There are no life
forms. It must have been short-
circuited.
INT. LIFEPOD
Artoo and Threepio look out at the receding Imperial starship.
Stars circle as the pod rotates through the galaxy.
THREEPIO
That's funny, the damage doesn't
look as bad from out here.
Artoo beeps an assuring response.
THREEPIO
Are you sure this things safe?