The focusing of the eye is the result of two things: the curvature of the cornea (which is responsible for the majority of the refraction of light into the eye), and the state of the lens.
When you are young, the lens is very pliable and it allows you to change the focus over a wide range of distances. To go from a focus of "infinity" to 25 cm, you need to be able to change the refractive power of the eye by 4 diopters. That's typical for a healthy young eye - but there are two things that can change where you comfortably focus. The first of these is the shape of the cornea - if your cornea has "greater than average" curvature, this means that light from closer up will be in focus while the lens is relaxed: now add 4 diopters, and the final focal distance you can achieve may well be less than 25 cm. You would be considered "near sighted", and might need glasses (with negative power) to see properly in the distance.
If your eye is insufficiently curved, a healthy lens may not be able to get you to focus close up; in that case you might need a corrective lens with a positive power.
Finally, as you get older, the lens's ability to adjust diminishes; and sooner than you would like, you will need corrective lenses (maybe even bifocals or even more complex lenses) to cover the full range of distances. Perhaps it's just computer glasses so your eye is more relaxed while looking at a screen (our eyes did not evolve to be focused at a short range for long periods of time), but eventually it's one pair for driving, one for reading, one for...
From the comments, it is clear that you have "defective eyesight" which is corrected with a diverging lens (negative power). When you take the glasses off, your eye is naturally focused closer than "average". This is the explanation why in your case you can see objects in focus at a distance of 10 cm.