It seems that in the 1920s, diners and soda fountain
employees used to use code numbers to communicate with each
other. 82 meant "I need a glass of water," 19 was a call
for a banana split, 99 meant "the manager is on the prowl,"
and 86 meant "we're out of that item."

Later 86 came to mean "Whatever he asks for, tell him we're
out of. He's broke, so don't serve him anything."
Eventually, when someone was 86ed, he was simply asked to
leave or thrown out.