Evolutionary convergence
Why does the octopus eye resemble ours so much?
Because the two lineages invented the same device separately. Our last common ancestor had nothing like it. If the two eyes look so alike, it is because this design is the most efficient way to form a sharp image.