In O. Henry's short story "The Cop and the Anthem" the main character, Soapy is a proud man. It is his pride that leads to the story's great irony. As a homeless man on the streets of New York City, he could take advantage of any number of charities, but his pride prevents him from doing so. He was a strong believer that a man should only take what he can afford to pay back in one way or another.
There was an endless round of institutions, municipal and eleemosynary, on which he might set out and receive lodging and food accordant with the simple life. But to one of Soapy's proud spirit the gifts of charity are encumbered. If not in coin you must pay in humiliation of spirit for every benefit received at the hands of philanthropy.
Instead, he decides that it would be better to get arrested than to accept a handout from a stranger. He knows that if he is in jail he will have a warm meal, shower, and place to sleep and, more importantly, he would not owe anyone anything. So poor Soapy tries numerous ways to get arrested. It is only when he decides to live the straight and honest life that he is arrested and sent to jail.