Ever wonder why mediocre restaurants remain packed on Friday nights? Those complimentary cookies servers drop when they hand over the check may be the key.

Ben Leventhal, co-founder of Eater and president of personal chef marketplace Kitchensurfing, reflects on the problem of the mediocre restaurant in a recent post on his blog. While bad restaurants will inevitably close, the mediocre restaurant can get by for years while dishing up sub-par food. To understand this problem of how the bad survive, he introduces the idea of the Peak-End Rule. The rule claims that customers tend to remember their dining experience based on how things were going at the peak of their meal, which is often at the very end. Restaurants across the board are able to capitalize on the end of the dining experience—hence, people might go back to restaurants with medicore food after forgetting how disappointing the meal actually was.

[via Medium]