Question: why can xehanort time travel?
Answer: Ansem's function as a Heartless, a disembodied heart corrupted by darkness, enabled him to travel through time, just as Xehanort planned when he cast off his heart to create the former incarnation.