It's certainly not uncommon in a number of European countries and perhaps elsewhere due in part AFAIK to self-serve being taxed less than full service.
I've also known of numbers of Chinese restaurants in particular that offer 10% discounts for takeout orders but that's a little different.