You'd need a ticketing system so people even remember what their number is. And for what upside when names work fine?
Receipt.
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.