Zelda has demonstrated multiple contradictory models of time travel. This is okay because the time travel is magic-based, not science-based.
I'm gonna explain it, though. [spoiler]At the end of Ocarina of Time, Zelda sends Link back in time to undo everything that was fucked up. The timeline he was sent from, the adult timeline, led to Wind Waker, because Link was no longer around to be reincarnated and stop Ganondorf when he came back. The timeline he was sent to, the child timeline, led to Twilight Princess, because he met Zelda with foreknowledge of what was going to happen, and so got Ganondorf executed before he could put his plan into motion. Then, in the what-if scenario in which Link got a Game Over somewhere along the way, Ganondorf won, necessitating his defeat in the war mentioned in the backstory of Link to the Past.[/spoiler] Does that make sense?