I can't say for sure. What I can say is that if a buyer wants cheap then you get what you pay for. Watching all the complaints over the years about triggers as an example. To get a better than average trigger then you have to pay a higher than average price. I think Smith tried to find that balance for the consumer to keep affordable quality guns for the average shooter while letting others improve what they wanted if they felt the need.
Consumer feedback says we want better out of the box. Ok...no problem...get out your wallet. Now the M&P has longer frame rails, more rigid frames, aggressive textured grips with 4 back strap sizes instead of 3, smoother lighter trigger with better reset, ect. All these things are great but come at a higher price. I still think the M&P is the best value out there. Throw in lifetime warranty and American made...that's a winner.
edit: Glock charges more because they have a devoted fan base but IMHO not a better gun.