While true, be careful how far you take this. My understanding (I don't know how to verify it) is that McDonalds knew all long that their salads would never sell well enough to pay for the costs of having them. They however rolled them out nationwide, and advertise. The salad itself isn't worth any of this (even though some of their salads are good and with the right dressing healthy), except that in an office there is often "that one person". By having something "that one person" will eat the rest of the office will have go for a team lunch at McDonalds. Thus the salad caused 4 other people to buy a big mac who otherwise would have eaten elsewhere.
When trying to decide what to sell you need to consider these hidden details.
McDonalds is seen as unhealthy fast food relative to other fast foods (subway etc..) To combat this, they introduced a 'healthy' menu that makes people think mcdonalds isn't that unhealthy, they have salads and healthy options after all, so they're more likely to go in the first place.
Once they get there, they'll order what they want, which isn't salad in the first place.
McDonalds introduced their first salads many years before subway became a national chain. Of course current competition is a good reason to keep them, but it clearly can't be cited for the initial decision.
When trying to decide what to sell you need to consider these hidden details.