In Malala’s story, using a memory like this is a great way to show her desires.
Here, language is important. ‘My mind transports me back’ has a dream-like quality. Her memory uses positive language: reunited, friends, together, talking and joking. It’s in present tense too; it’s happening now (in her mind, at least).
Compare that with the final sentence ‘Then I remember I’m in Birmingham, England’. Reality has hit, so the sentence is short, blunt, and factual. Not where she wants to be at all.