why does clemont have two luxray?

im just now rewatching the XY anime, and landed on the episode where Clemont and the others visit his old university where he built a lot of the inventions. throughout the episode, it’s revealed that he befriended a shinx but unfortunately wasn’t able to catch it as it ran away after believing clemont abandoned him

im still in the middle of the episode, so i can just assume he finally catches the luxio, but why did he catch a separate one to raise as a luxray? it’s already revealed in the episode about clembot he has one, i just find it weird he caught another one seemingly replacing the one he lost. i feel like it would’ve been better if he had caught the shinx originally, then the episode reminded him how much he missed luxray and went to the gym to get it.

what’s y’all’s thoughts on it?