I was a certified optician and ran a lens lab for Pearle Vision in the early 2000's.
Our most expensive frames, excluding the weird Armani shit we carried, cost us $20-$30 per frame. They sold for $200-$400 depending. Our cheapest frames cost us $2-3 each, and none sold for less $50.
The lenses, that's a lot of markup. I started in a brand new store, and we had a brand new lab full of Essilor hardware. Latest and greatest at the time. Standard lenses, nothing special just the standard CR32 plastic in a typical prescription? They cost $2 or so and we charged $40 each. So a "basic" pair of glasses cost us $8 in materials and was sold for $130.
The worst markup was on the high end lenses. At Pearle (at that time) the top end were the MTPROA lenses. Micro-thin polycarbonate aspheric lenses with anti-scratch and anti-reflective coating.
Basically, if you have a strong prescription (+- ~3 or so) aspheric can make a much thinner and lighter lens that can give you the same vision a thicker traditional lens does. Add in anti-scratch ($) anti-reflective ($) and the cost of the lenses alone were around $400 for the customer. Pearle Vision's cost for the lense blanks? $23.
The entire cost of the Essilor equipment in the lens lab at my location was only ~$250000, and we regularly sold $800+ glasses.
And, the part that I really hate, Mainecare (Maine medicare) at the time wouldn't provide coverage for anti-scratch coating (it was technically an "upgrade"). We couldn't buy lense blanks that didn't have it. My instructions were to strip the anti-scratch coating when making lenses for Mainecare clients. I ran the lab. Guess what I never did.