To me, this ending is tragic because it shows us how two people who used to be best friends have grown apart. And it is tragic because it forces one of the two best friends to actually take away the other friend's freedom.
If you are Jimmy Wells, walking down the street, you are hoping that you are going to see your friend again -- someone who was like a brother to you. But then you see him and you realize he is a criminal, a kind of person you have sworn to fight against. This would be incredibly sad -- to find that your best friend has become a kind of person that you hate.
So the story is tragic because it builds up these hopes and expectations on our part. We hope for and expect a happy reunion between the two men and all we end up with is Jimmy having to have Bob arrested.