Optometry is a licensure racket with strong legal barriers to entry. The sale of glasses is ostensibly a separate business without the same barriers, but I suspect it rides on the coattails of optometry's racket. I think there's an inertia tie between the eye exam and the purchase of glasses.
The cleanest way to end this nonsense is to break the optometry licensure racket. Think about what optometrists actually do. Think about all your eye exams and the whole "1 or 2" procedure as they flip through lenses. Honestly, most adults could probably do that job and produce a correct prescription after maybe a week's training. I'm not saying they're inherently bad people or anything, and I like my optometrist, but it's a racket just like realtors, lawyers, and other guilds that use the law to prop up their prices and reduce competition.
There's at least one startup out there that wanted to do eye exams through a specially designed web app. Expect the optometry racket to lobby hard against this, just like taxi rackets tried to stop Uber. And there ought to be companies offering cheap glasses online any second now...