Disclaimer: my wife is an optometrist (in the US).
My guess is what you're seeing is a bit of a misrepresentation. My wife would be thrilled if VSP (or any other vision insurance) reimbursed even near that amount. You might be seeing a statement that the insurance plan saved you a certain amount (the standard price of the exam), but the optometrist is not making that money.
Instead, what they do is if the doctor wants to accept their insurance (VSP, EyeMed, Superior, etc), they have to agree to a contractual amount of reimbursement for a standard comprehensive vision and eye health exam, which is often on the order of $35-45 on average. The doctor also would get the copay amount (often $10). Similarly, if you add in contact lens evaluation into your exam, they will reimburse a bit more for that portion. However, it is very rarely even close to $258 unless you have a very specific condition/situation (for example medically-necessary contact lenses, etc).
Your optometrist will have had 4 years of post-graduate education (and probably the 6-figure student loans to match), where they would have learned how to diagnose and treat a wide variety of ocular and even systemic conditions that may first present themselves in the eye. So for the $50, you're getting a steal of a deal. While it is not entirely a loss-leader (an Optometrist can make an OK living this way if they have enough patients--though still lower than what most Software Engineers make), this is why you will often see an Optical in private practices, rather than exams only.
My wife's office obviously sells glasses, however it is worth mentioning that the prices that are presented are largely a result of the underlying wholesale costs of the materials, with some margin to account for labor and facilities. I cannot say that some of the materials from the manufacturers are not overpriced, but there are substantial quality differences between different frames and different lenses.
The advantage of getting your frames from the same place as your doctor is that any lens recommendations for your best quality of life can be relayed directly. Ideally the optician will then help you sort through the pros and cons of different lenses and frames, along with what your insurance may cover, to ultimately get you something that you'll love at a price you are comfortable with. This often is more important as you get older and have a need for progressive lenses. The measurements get trickier, and each lens type may have different advantages. Single-vision lenses are much less particular, and you may have more success with the online shops if you are in this life-stage.
This kind of personalization is not required by everyone, but some people really appreciate it.
Basically, some people will probably have success with the online shops. That's OK. However, they don't work well for everyone.
One more thought: very few purchases will have as much impact on your daily life as your glasses, they literally affect the way you perceive the world, as well as potentially how others perceive you (fashion). We all wish things we buy were cheaper, however the cost/value proposition on glasses is not that bad when you think of it this way. The final decision on how to spend your money is up to you, as the consumer, in the end.