Yes, precisely. Even my local (definitely not very high-tech) fish-and-chip shop can manage to print a number at the top of the receipt, and then call that number out when your food is ready.
Starbucks ask you for a name to make the process seem more personal and friendly. Apparently they started doing this in 2012; it was met with quite some head-scratching in the UK at the time. The other big coffee chains here do not do this, to the best of my knowledge.
Receipt.