(A friend of mine pointed me at this discussion. I work in vision science, but not this particular field...)
In humans, pupillary dilation is a common response to excitement of any sort - fear, pain, sexual arousal, etc etc. Whether this reaction serves some evolutionary purpose in itself, or whether it's just a coincidence due to pupils being controlled by the same biochemical signals that affect other physiological processes, I couldn't tell you. But don't rule out the possibility of a non-optical explanation...
Incidentally, the eye does elongate & shorten to a degree. It's not the main mechanism by which we focus, but IIRC it's enough to have non-negligible effects on that process. And when you blink, the muscles that normally serve to orient the eye will actually pull it back a little way into the socket - this can be tested by holding somebody's eyelid open and startling them.
Outside the box
In humans, pupillary dilation is a common response to excitement of any sort - fear, pain, sexual arousal, etc etc. Whether this reaction serves some evolutionary purpose in itself, or whether it's just a coincidence due to pupils being controlled by the same biochemical signals that affect other physiological processes, I couldn't tell you. But don't rule out the possibility of a non-optical explanation...
Incidentally, the eye does elongate & shorten to a degree. It's not the main mechanism by which we focus, but IIRC it's enough to have non-negligible effects on that process. And when you blink, the muscles that normally serve to orient the eye will actually pull it back a little way into the socket - this can be tested by holding somebody's eyelid open and startling them.