I'm not defending the episode (at all) but I believe her thought process was that if she hadn't missed those 10 months, then neither Ryan nor Graham would want to stop traveling on the TARDIS.
And even with that, the statement was really just a prompt for Yaz to say her "its ok to be sad" line... which is more the result of lazy writing than some moral failing of the character.