^ Which supports Xehanorts explanation of the timeline that events truly can't be altered. Which is why any traveler from the past to the future immediately loses their memories upon return.
As Young Xehanort stated "Even though one can move through time, time itself is immovable"
The timeline in kingdom hearts always corrects itself in some form or fashion.
This is also most likely why the Xehanorts seemingly could only all be present at the end of DDD for a set amount of time.
Exactly, this brings us to explanations for more than one issue with the time travelling stuff.
It's not like you cannot try to alter the timeline by going into the past, like i.e. Aqua could try to travel to the past and interfere in the afternath of Terra's battle with MX (i.e. like acting like a tennis player and swat MX's floating heart back to him before it can reach Terra's body) or Lea travelling back in time to throw a chakram into Riku's back before he can turn into Ansem SoD and capture Roxas.
It may even look at first as if it's going to work, but then there will be inevitably another event that occurs which somehow ensures that what happened in the original timeline still comes to pass anyways.
Of course, any of those "self correcting" events would be forgotten by everyone involved because they never really happened, they just cancel out another event that was not meant to happen because someone tried to alter something that was already carved into the universe's history.
Depending on where "the marker" is that signals the univeral "present" (which may be the finale of DDD), any events before DDD are not part of the future anymore and thus cannot be truly altered.
The Timeless River is a great example really, pete used a special door to enter the past and in order to counter it a second door also existed which Merlin summoned.
Yep, what's even more interesting is that the door for Pete only appeared after he was chewed out by Maleficent for being a failure and he longed for the easier days of his past. The worlds literally gave Pete a chance, a chance to reform by just looking at his past life in order to maybe return to that life in the present. It could also be treated as a test of character for Pete administered by the worlds.
But instead of taking that chance he informs Maleficent about it who immediately decides to use it as an advantage for their schemes and commit a highly immoral thing by trying to change the past. Hence the worlds already preparing that second door for SDG as a counterforce to ensure everything would go back on track as it should be, with Merlin the great wizard being the medium the worlds chose to reveal this particular door.