Your eyes are accustomed to adjusting to see things further away and close by.
When you use a computer for an extended period of time your eyes don’t adjust themselves because you never look closer or further away.
This causes damage to your eyes and leads to you needing glasses.
To avoid this take a break every 20 minutes and look off into the distance.