The main reason is the commission charged by the credit card companies. This is often five percent, but can be as much as ten percent.
Some of the Japanese restaurants I frequent give me small discounts (usually around five or ten percent) in appreciation of my business and because I always pay in cash. In fact, the chef of one sushi restaurant with whom I am friendly told me that he is charged a ten percent commission by some credit card companies.