That's because we only saw the the scenario where the hero of time won. :p
The scenario where he lost, we didn't see, but it's outlined in a Link to the Past, Nintendo even retconned the text in the GBA(Or DS? I forget)remake of Link to the Past to say it was the armies of Hyrule that took up arms and the Sages that banished Ganon, which fits that timeline.
Think of them as 3 timelines branching from tOoT: Power Timeline(Ganon was victorious), Wisdom Timeline(Zelda left alone in the repaired future), Courage Timeline(Link sent back to his own time).
Also I fully admit that the Zelda timeline is...thin lol, but Nintendo has found a way to make it work!