That's probably not "The Knowledge"; that's just some local experience and the fact that it's a high probability someone is going from that precise restaurant quite often. I myself have drunkenly hailed many a taxi outside dodgy restaurants in London. Unlicensed minicabs are pretty good at that too.
Conversely, got a taxi from Angel to Leyton and the idiot went via Poplar and the A13 and the journey cost me £55 for a £30 journey.