We know little about the reason of nerves to be in front of retina.
During ontogenesis when brain develops there are processes which establish connection between eye-nerves and brain cells responsible for vision. These connections are established during so called test vision, whene there are not present light signals entering the eye. Yet those signals are simulated in dry run in eye nerves.
The vision of octopus should be reconsidered if such precise connections are possible to be made during ontogenesis as for example in eagles.