I live in Portugal and I have needed prescription glasses since i was a child (I'm now in my 40s). I have always felt frames particularly are priced in a cartel like way. Of course for lenses there is more of a justification depending on the thickness/prescription (it is harder to make a more curved lens that is thinner and lighter).
In frames they try to get you to go for the branded style (Hugo Boss, Gucci whatever...) This is discussed extensively in the above article. [1] In lenses they try to sell you add on treatments (Anti-reflex, UV coatings, etc) In my experience some of these coatings end up shortening the lifespan of the lens as they create a surface that is easier to scratch.
I think local opticians take advantage of the fact that people's face dimensions vary so much and that people need to try on tens of options before they find one that is both comfortable and good looking.
Given the low prices for frames practiced by some online stores (https://www.zennioptical.com/ for example) I'm very tempted to even buy the frames online and then going into the local opticians to get them to make and fit the lenses. I'm pretty sure they will try their best to scam me into some overcharge if I do that though...