Put aside the question of why customers give tips.  That’s certainly a huge mystery but the fact is that many diners give tips and the level of tip depends on the quality of service.

In this article (via foodwire), a restauranteur explains why he decided against a switch to the European system of a fixed service charge.

We looked very hard at this [servis compris] policy fifteen years ago. We were going to call it “hospitality included.” We felt people who worked in the dining room were apologizing for being hospitality professional. I felt there was a resulting shame or lack of pride in their work. My assumption was that it was fueled by the tipping system, and I was troubled by the sense that the that tipping system takes a big part of the compensation decision out of the employer’s hands. So we brought up the “hospitality included” idea to our people. To our surprise, it turned out the staff actually enjoyed working for tips.

The tipping system encourages servers to put more weight on the diner’s welfare than the restauranteur would like, at least at the margin.  You can think of the waiter as selling you extra bread, more wine in your glass, and more attention at the expense of less generous (-looking) diners.  The restauranteur incurs the cost but the server earns the tip.

On the other hand, a fixed service charge provides too little incentive to take care of the customers.  You can think of a tipping system as outsourcing to the diner the job of monitoring the server.

(I once had a conversation on this topic with Toomas Hinnosaar and I am probably unconsciously plagiarising him.)