According to this site, your child's eyes can/will change throughout their growth stages.
Fact: The eye is NOT full size at birth but continues to grow with your child. This growth partially accounts for refractive (glasses) changes that occur during childhood.
Similarly, glasses are not inherently detrimental to their ocular development:
Fact: Refractive errors (near-sightedness, far-sightedness, or astigmatism) change as kids get older. Many variables come into play, but most of this change is likely due to genetics and continues despite wearing glasses earlier or later or more or less. Wearing glasses does not make the eyes get worse.
For what it's worth, 20/40 was my vision at that same age. But, and this is worth noting, I had/have astigmatism, and at the time I still had a lazy eye. (The lazy eye was surgically corrected right before I turned thirteen.) I have worn glasses since I was five, but my vision without my glasses is fuzzy but not Velma Dinkley bad. My brother, on the other hand, has had his vision deteriorate over time, but it seems to have stabilized now. Mine actually improved in my later teen years, after my surgery.
One of my parents wears glasses, the other needs reading glasses. My paternal grandmother had glaucoma, and my maternal family is susceptible to diabetes. All of these are factors in vision and vision development.