Bob speaks to the policeman because he doesn’t want his behavior to raise suspicion.
Jimmy and Bob have been friends for a long time. They made a date twenty years before to meet on a certain spot on a certain date. When Bob arrives, having gone out west, he discovers that the restaurant is now a hardware store. He wants to keep his date, so he stays in the doorway of the now-closed hardware store.
When Bob sees the policeman, he doesn’t want his behavior to seem suspicious. Bob is a criminal, so he is used to acting suspiciously and being suspected. He calls out the policemen to let him know what he is doing there. He speaks “quickly” when the cop walks toward him.
“It’s all right, officer,” he said. “I’m waiting for a friend. Twenty years ago we agreed to meet here tonight. It sounds strange to you, doesn’t it? I’ll explain if you want to be sure that everything’s all right. About twenty years ago there was a restaurant where this shop stands. ‘Big Joe’ Brady’s restaurant.”
The two of them have a discussion about the restaurant and the date between Jimmy and Bob, but the policeman never introduces himself. He just comments that twenty years is a long time between meetings. Bob expounds on Jimmy’s traits, explaining what a good friend he is.
“… I moved around everywhere, and I moved quickly. But I know that Jimmy will meet me here if he can. He was as true as any man in the world. He’ll never forget. I came a thousand miles to stand here tonight. But I’ll be glad about that, if my old friend comes too.”
The policeman moves on, and a man shows up pretending to be Jimmy. Bob gets wise when he realizes that the man looks too different from his old friend. He then hands Bob a note from Jimmy explaining that Jimmy was actually the policeman he talked to earlier. He recognized him as the criminal wanted in Chicago, but did not want to arrest him himself, so he got another cop to do it. That's what friends are for.