“The eye is the lamp of the body. So, if your eye is healthy, your whole body will be full of light, but if your eye is bad, your whole body will be full of darkness. If then the light in you is darkness, how great is the darkness!” (Matthew 6:22–23, ESV)
An eye that cannot focus itself on its objective is not healthy. And an unhealthy eye prevents light from entering the body.
Since there is not another organ that perceives the light, if the eye is unhealthy, the whole body is going to be dark.
But this is just a metaphor. Jesus might have just said, “failing to be single-minded about where you lay up your treasures will end in spiritual disaster.”
The question is, why did he say it like that?