Jimmy has to have his old friend arrested because it is Jimmy's sworn duty to enforce the law. It should be noted, however, that O. Henry deliberately softens Jimmy's betrayal by making Bob's offense ambiguous. The reader should not assume that Bob is going to spend years in an Illinois prison. The plain clothes man who arrests him uses these words:
"Chicago thinks you may have dropped over our way and wires us she wants to have a chat with you."
Bob may only be wanted for questioning. And, since he is obviously a smooth talker, he may be able to talk his way out of whatever jam he is in. In fact, Chicago may only wanting to question him about somebody else. Furthermore, the arresting officer does not treat him like a dangerous criminal. He talks to Bob in a polite manner and even hands him the note from Jimmy. There is no mention of a gun or handcuffs. The plain clothes man says:
"Going quietly, are you? That's sensible."
Judging from "Silky" Bob's name, manner, and conversation, he is probably a confidence man and not a dangerous criminal. The arresting officer even makes Chicago seem less forbidding by referring to it as "she." She only wants to have a little "chat" with Bob.
Chicago may have a hard time arranging that chat. Bob cannot just be shipped off to Illinois. He would either have to be extradited, or else Chicago would have to send a couple of detectives to New York to interview him. Bob evidently has money and can hire a good lawyer. He can fight extradition. Chicago may decide she has enough trouble at home without importing more from New York.
So O. Henry tells the story in such a way that Jimmy does not seem too cruel to his old friend.