Your vision could change faster than however often you need your cornea examined or whatever. Or someone may not be able to afford a doctor's visit but know they need glasses (ignoring the question of whether it's right for people to not be able to afford an eye doctor's visit).
Extending your logic to other areas would end up with absurdities like needing a doctor to measure your waist size before you can buy clothes. "You should visit your doctor regularly anyway, what's the value of allowing people to buy pants without a prescription?"
You're just as likely to get the wrong prescription with an optometrist -- they're relying on your self-report after all -- except it's harder to correct, because you need to go and make another doctor appointment to have it corrected (vs using the machine again).
Also, if someone feels they would get better vision correction working with a trained professional, I'm fine with that. I only object to _requiring_ a doctor's prescription to get glasses.
Extending your logic to other areas would end up with absurdities like needing a doctor to measure your waist size before you can buy clothes. "You should visit your doctor regularly anyway, what's the value of allowing people to buy pants without a prescription?"