Bob and Jimmy both grew up in New York City, but when Bob was eighteen and Jimmy was twenty, Bob decided to leave the city and head out West to try to get rich. Jimmy was dedicated to New York and had no intention of leaving. As Bob says, "He thought it was the only place on earth." So the two friends parted, but they made a pact to meet again in exactly twenty years in the exact spot where they had their good-bye meal, Big Joe Brady's restaurant. They agreed to meet no matter how far they would have to travel and no matter what shape they might be in. They thought it would be interesting to compare notes at that point and see what type of person each had become. Bob seemed particularly interested in making his fortune, so from his perspective, seeing how wealthy his friend had become and showing off his own wealth was part of the motivation to meet again.
Interestingly, both men kept their promise, although each was surprised by the outcome. Jimmy had become a policeman, and as he patrolled where the restaurant had been, he noticed his old friend but recognized him as a wanted criminal. He didn't reveal his own identity to Bob but rather sent another officer back to pretend to be Jimmy. Bob only realized the first officer he'd met was his old chum when he read the note Jimmy sent him.