It is shown that way round because - bizarrely - the anatomy of the retina is actually back-to-front in its structure. It's one of those quirks that shows us how the eye evolved - not "logically", but because this was the only way it could be done in the circumstances.
This means that to reach the light-sensitive pigment, light entering the eye has first to pass through the (transparent) layers of nerve cells etc.
After the light hits the pigment layer, the nerve impulse then travels "backwards" to get to the optic nerve and then out to the brain.
Does that make sense? Its described on the wikipaedia page on the retina if you need more detail