It's a metaphor - you're not actully going back in time when you enter the Echo, but simply view another's memories of that event - the past is immutable, but a person's perception of how events played out can be slightly tweaked to feature that Echo user within them, because an Echo scene is, quite literally, a very lucid daydream.

Up to that point, Cid has no memory of who he was or where he came from, but the player's Echo-tripping into his mind removed that 'veil' that was obscuring it (the same amnesia that affected everyone in Eorzea in regards to the identities of the original Warriors of Light), symbolized by a recollection of when he, Biggs and Wedge first fled to Eorzea which was then changed by having us materialize and hand his goggles to him, symbolic of us handing him "his memories' back.

This is why afterwards he says, "I remember, everything!" - he literally got all his memories back.