If I remember everything right, when Ganon attempted to take the Triforce. Ganon got the Triforce of Power because power was what he really wanted, while the others bound themselves to Link and Zelda. I'm not clear on exactly when Ganon reached the Triforce, but it seems to be implied that it was very shortly after Link pulled the Master Sword.