I would suggest Rey had been identified as being strong with the force, about to commence training, then someone took as many of these trainees and then dumped Rey somewhere insignificant, before completing their journey
Finn was also one such trainee, was not as lucky, but ended up being...