Actually, Ansem wasn't with him. Also, Riku's heart was stronger than Sora's because it was empowered by the Darkness Maleficent gave him.My theory is, the Keyblade doesn't actually choose "candidates", but rather goes to the strongest heart within reach. Rikus' Heart was unreachable at Destiny...