If eating at a cafe or restaurant I generally tip, but only if these is table service.
If I am purchasing and leaving then I consider that "shopping" and I don't tip at grocery stores as a example, so I am not tipping.
You will find most small businesses program their POS (Point of Sale) systems one way for all their checkouts. So if they need the option for tipping on one POS, it's their default for all their POS.