I don't have an other explanation than pointing to evolution. It was obviously not a problem to evolve the way it did. One article I found (see "The Inverted Retina: Maladaptation or Pre-adaptation?") called it a sign of pre-adaptation, where forms exist before they get their final function. Another pretty comprehensive review can be found here: "Evolution of Phototransduction, Vertebrate Photoreceptors and Retina."