It didn't likely get the complex eye in the first place; that's the point.
It got one cell that sensed light in the first place, but it gave some early multicell critter a bit more orientation to find food or more likely photons. Through a thousand million generations -- which is the right order of magnitude, according to Dawkins in Watchmaker a series of small changes -- many of which can still be found in organisms today -- produced a gradually improved compound of light-processing cells. The complexity is the results of a few simple constraints and a few elements vectored by only two factors: survival and procreative success.