Riku and Sora both had an equal chance of being the chosen one, that's how I understand it. Sure, Riku said he was actually the chosen one, but who says we're supposed to believe him? He's still brainwashed by evil and power! And he may take the keyblade from Sora, but Sora takes it right back. With all of Riku's power and confidence it's no wonder he was able to snatch it from Sora.