It's pretty much the template for a new companion on new Doctor Who: Their introductory episode takes place in present-day Earth, the second goes to the far future - generally a human colony post-Earth's destruction - and the third returns to Earth and goes back in time, introducing the companion and any new viewers to the general format.
It also seems to be as much of a template for that second, space-set episode to be a bit of a confusing mess, so "Smile" is a pleasant surprise to the point of almost being a format-breaker.
"Smile" by Frank Cottrell-Boyce, directed by Lawrence Gough. Spoilers after the cut.