Two things. I think #2 matters more for close-up work.
1)
Bright light makes the pupil contract, not dilate.
A smaller diameter aperture in a lens (like the eye) gives more depth of field – meaning things more things are in focus, whether they are near or far.
Dilation (a larger aperture) would cause short depth of field – things at one distance are focused, things nearer and farther are fuzzy.
Here’s an illustration of short vs vs long depth of field.
2)
Image sharpness depends on contrast, and bright light gives more contrast.
Think of black text on white paper. To the eye, the black ink does not vary much between dim and bright light – it’s very dark. But the white paper can go from very dim to extremely bright as you turn up the light level. The contrast increases and you can read the text better.