M&S are just another corporation, and their 'high-quality' products are a well-known unique selling point (USP). It's partly the reason why they are able to charge very high prices for their other products as well, like their suits/clothing for example. To put it simply, they will only stock the best-quality products, especially when it comes to food (speaking of which, are normally sourced fair trade as well). This creates a reputation for them being able to acceptably charge high prices for their products. Hence why the well known reputation for quality with their products keeps customers shopping there, and remains an integral part of the business.
Personally, I would never buy anything there really. It's just full of high-priced items, and the perceived illusion of being able to buy 'the-best-quality' items just isn't worth it for me. If I had to, it would simply be because of convenience. To keep food costs low I usually just buy from Lidls or Sainsburys, and avoid any small businesses selling the same products as the supermarkets do. That's for food only really. For other items, like clothes and random appliances (e.g. batteries), I will just buy them directly online - the reason being, because it is a highly competitive market (online retailing), so sellers will be in competition with each other constantly to offer the best price. This in turn gives me a much better price than any supermarket usually will.