>>50904855There should be 2 timelines in XY. One where what you said happened, and the other being the actual game you play. Serena wins the mega stone over Calem and they fail to contain the legendaries, so Calem has to go back in time and eventually becomes the immortal giant old dude you see in the game. This isn’t revealed of course until the end, and when you fight him he has all the same Pokémon you do except without megas, and after you beat him him the credits roll with flashbacks of his struggles of having lived humdreds of lives.