It’s not related to light, it’s related to over focusing, especially in peripheral vision. Keeping things close to the face keeps things in focus, making the eye thinking it’s over focused, so it grows longer to defocus. It’s called emmetropization and it’s how the eye grows.