Some people tends to stick to a memory, a good memory that they kept and those memories are usually associated to the person they’ re with (specifically, their boyfriend or girlfriend). And when breakup comes, their separation seems to detach those memories along with that somebody. Then you’ ll long for those memories (even though they’ re lost but it wont happen again) and because those memories are associated with the person, we can assume that they long for the person too. (some may be against to this, but this is the most common thing that happens).