The thing that you have to remember when you are buying glasses from the opticians, whether it be a chain store or an independent, that there are LOTS of overheads and expenses that need to be covered. The price that most opticians charge for an eye test (and what the NHS will pay for one) only partially covers the actual cost of the test, so that difference has to be found somewhere.
When you buy glasses, you aren't just paying for the frames and lenses, you are paying for someone to take measurements, the materials, the electricity, the special equipment to surface and glaze the lenses which needs frequent maintenance, water which is needed to cool the lenses as they are cut, staff costs for everyone involved from the receptionist to the lab technician, the dispensing optician who has to check the glasses and ensures that they have been ordered and made correctly, and all other ancillary staff right down to the cleaners, all of whom deserve to earn a living wage.
You are also paying for the continuous training that all optometrists, contact lens staff and dispensing opticians are legally required to do, and the general staff training which, whilst not legally required, still has to be done. You are also paying for professional fees/memberships and insurances, rent, heating, business rates and tax, electricity, marketing/advertising, computer equipment, specialised testing equipment, other services such as IT support and accounting, and many, many other things, right down to the soap and paper towels that the optometrist needs to wash his/her hands between patients.
And then of course any business needs to make a profit, so that they can afford to upgrade and improve and expand their equipment, premises and services as required.
When you take all of those things (and everything else) into account, the margin on a pair of glasses isn't as much as you would think. The reason why places like ASDA are cheaper, is that they can afford to make a far smaller margin on that part of their business, because the rest of the supermarket supports them.