I stumbled across this phenomenon by accident a long time ago, but realized that it was a "known thing" soon after, and that the reason it works makes complete sense in terms of optics.
If you wear glasses in order to be able to read, at some point you have probably had the frustration of realizing that you left your "readers" elsewhere, and suddenly found yourself unable to read a menu (etc.).
Try this neat trick:
(1) Take a small piece of paper, poke a hole through it a millimeter or two across, roughly the size of a pencil lead or a ballpoint pen tip.
(B) Without your reading glasses, try reading something that you normally can't read without glasses (confirming that yes, like me, your eyes are not what they used to be!)
(III) Now, take the paper with the hole in it, hold it in front of one eye (other eye shut), about the distance from your eye that your reading glass lens would be, try reading the same thing again. What you will see is a legible image, but somewhat dimmer. Eureka! At least you can read it!
What is going on here? Although light travels in a more-or-less straight line between the page and your eye, there is always some light scatter within your eye. Your eye is designed to focus that light onto your retina, but the eye optics are not always perfect, or diminish with age (yes, I know the rest of you are only 25 years old, but I'm 65, believe me, it diminishes). Looking through a pin hole blocks all of the light rays that are not traveling straight to your eye and through your eye, straight to your retina. What you see is a dimmer, but sharper, image!
This is similar to what your eyes are trying to do when you squint. Also similar to what the iris in your eye does in bright light, reducing to a pinhole (the iris does not work as
well when you are 65). Your optometrist might have a device in their toolkit called a
pinhole occluder that can be used for diagnostic purposes.
So what good is this when you are trying to read your menu and don't have a scrap of paper or pencil handy? You can also use your hand, see:
https://www.sightsize.com/the-value-of-squinting/Interestingly, for 800 years or more, the Inuit people have used a similar principle to make snow goggles to limit light reaching the eyes, prevent snow blindness, and sharpen visual acuity:
https://en.wikipedia.org/wiki/Snow_goggles and
https://parks.canada.ca/culture/cseh-twih/202124