But why tip a waiter and not a shop assistant?
Or the driver of a taxi, but not the driver of a bus?"
Why would you tip a shop assistant? They make minimum wage unlike most US wait staff and if they're full time they get full benefits. The system is fairly simple. We tip those who make under minimum wage or barely that. The tip should make up for the clear income disparity. I give 15% tips to waiters but my sister, who is a waitress, says I should tip 20% and without tips she'd never made any money.
Again, why would you tip a bus driver? They work for the city in which they operate and are typically well paid - benefits and all. For example, New York City bus drivers make good pay and their benefits includes paid life and health insurance, sick leave, vacation leave, and free bus transportation on the system’s regular routes.
So here in the US we tip those at the bottom of the service industry. While a shop assistant and a bus driver are not a doctor by any means, they're also not at the bottom either. The system is clear to us, but yes I've heard from foreigners that they do find it confusing. Hope this makes it more understandable. :)