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.
In fact, such a policy would probably be catastrophic, because there was a big fight over whether we would all be required to carry compulsory ID cards here a few years ago, and for once the civil liberties side won after a big campaign.
Most older Brits don't carry any sort of ID at all. Young people often need ID to buy booze, but when you're old enough that nobody could mistake you for under 25 they never bother you. Source: I've never carried ID, in my 40s this ceased ever causing any hassle because now nobody ever even asks.
I can perhaps imagine this happening in some [crappy centre-town, tourist-trap] nightclubs, but literally not in a ‘Denny's type’ cafe restaurant.
I can't even begin to imagine why, short of some scam or bored locals teasing tourists.
I wouldn't be entirely surprised if you had to do this to get into a restaurant somewhere slightly sensitive, such as at the top of a skyscraper. And i have been asked for ID - and patted down! - going to the bowling lanes in a slightly gangy part of town.
But nobody's going to give you the third degree to get into a Nando's.