Anything that you buy from a dealer be it a car, instrument, watch, antique clock is going to cost more than from a private sale. The reasons have already been listed.
I don’t think musicians have any reason to grumble about prices of instruments. If you’re not looking at the vintage or premium end of the market then prices and quality are still fantastic compared to most other periods in history. G&L tribute series, Harley Benton etc etc are still stonking good value for money.