It was explained (very briefly) near the end of the episode: Because the Doctor had crossed his own timeline, only the most recent version of him would remember the events. That "amnesia" protects the timeline. Without it, both Ten & Eleven would have started out already knowing what happened -- yet much of it happened only because they didn't already know. This also allows for the involvement of Twelve in the events; it is also implied (by his statements in "The Time of the Doctor") that Eleven does not retain the memory of encountering the (possible) future incarnation referred to as the Curator.
Although it's never been explained in dialogue before, we've seen the same effect in other multi-Doctor stories. In "The Three Doctors", for example, Three began with no memory of the events, even though his 1st & 2nd incarnations had taken part in them.