Well the ones that didn’t do this got eaten by bats, it’s very easy to see how survival of the fittest works CB in this case. Designing an eye with evolution seems somewhat harder...
>Designing an eye with evolution seems somewhat harder...
It's absolutely trivial. You just start with light sensitive skin. Then evolve a cavity to create a pinhole lens and then finally fill the hole with a lens. Making the eyeball move is optional but shouldn't be too tricky.