You've possibly been scammed in some way. Watch out for weird things happening in your name. This is not normal and most likely not legal.
It would be very unusual for a restaurant to do so, but I'm wondering if it might have been a restaurant with a nightclub attached (if we're talking central London here maybe Tiger Tiger?). That's quite plausible.
But I do see your point.
That said, at least years ago, the ID scanners would operate on data stored on the card and not make any network connection to a database. So then more expensive fake IDs began to exist that could scan fine. Then, I think some bars started getting more expensive ID scanners which actually do talk to some database.