In “Revolution of the Daleks,” we meet up with the familar “fam” after the Doctor has disappeared (arrested and imprisoned by the Judoon at the end of the previous episode, “The Timeless Children.” Unbeknownst to the Doctor, in the lives of her companions she has been missing for 10 months (the real gap between the two episodes, amusingly) with no explanation.
For Ryan, this has been a period of reassessment and introspection on his life. The character had always been somewhat conflicted about the time he was missing in the lives of his friends (as seen in other episodes), and in “Revolution of the Daleks” he lets the Doctor know, in the quiet moments, that he feels he has worked out his purpose in life, and it is to watch over his “home” – planet Earth.
Graham at first makes it clear he plans to continue adventuring with the Doctor, but given a choice between his own desire to see more of the universe and an increased role in Ryan’s life as his grandfather, he ultimately chooses the latter. At the end of the special, Graham and Ryan are seen planning their own new adventures on Earth, investigating unusual reports of possible aliens.
This follows in the footsteps of previous companions of the Doctor, most notably Sarah Jane Smith (as seen in her spin-off series), who became an investigator of paranormal events. Likewise, Jo Grant (another companion of the Third Doctor) devoted her post-TARDIS life to saving the Earth through environmental causes. Ace, a companion of the Seventh Doctor, began a global organization called A Charitable Earth, while Martha Jones and Mickey Smith appear to have become married alien hunters (as seen briefly in “The End of Time, Part II”), to say nothing of the heroics of Captain Jack Harkness.
While Yaz’s story with the Doctor continues, Ryan and Graham appear to have understood that their fates lie elsewhere. For series 13, a new companion named Dan (played by John Bishop) will join Yaz and the Doctor.
Originally from https://screenrant.com/doctor-who-graham-ryan-exits-reasons/