Soapy is definitely the main character and the protagonist in "The Cop and the Anthem." He is not the narrator. The narrator is the very familiar "third-person anonymous" voice who knows a lot about Soapy but is not omniscient. Soapy is the viewpoint character; everything is seen and experienced through Soapy's point of view. Soapy is a dynamic rather than a static character. A dynamic character is capable of changing, and the story is mainly about the change that takes place in Soapy's character as a result of his failures to get himself arrested and then hearing the old, familiar anthem played at the church.
As a matter of fact, Soapy has already changed at least once before this epiphany. He is not the usual type of bum who lives by panhandling and who sleeps on park benches. Soapy still has middle-class manners and some vestiges of middle-class clothing. The narrator never explains the reason Soapy fell from high social status to the lower depths, but it is obvious that Soapy was once a gentleman with refined manners and discriminating tastes. His choices of the food and wine he intends to order at the first restaurant, where he is denied service because of the condition of his trousers, show that he was once accustomed to an entirely different lifestyle than he has now.
A roasted mallard duck, thought Soapy, would be about the thing—with a bottle of Chablis, and then Camembert, a demitasse and a cigar.
Then at the end the narrator makes it clear that Soapy had once enjoyed a comfortable and respectable life.
He viewed with swift horror the pit into which he had tumbled,the degraded days, unworthy desires, dead hopes, wrecked faculties and base motives that made up his existence....He would pull himself out of the mire; he would make a man of himself again; he would conquer the evil that had taken possession of him. There was time; he was comparatively young yet; he would resurrect his old eager ambitions and pursue them without faltering.
So Soapy has already changed once, and he has decided to change again when he gets arrested for vagrancy right outside the church. Soapy is sentenced to three months in jail, which was what he wanted in the first place but doesn't want anymore. When he gets out of jail he will have changed again. He will probably have lost his genteel affectations and will be just an ordinary bum.
A good moral for O. Henry's story is to be found in Nathaniel Hawthorne's story "Wakefield."
Amid the seeming confusion of our mysterious world, individuals are so nicely adjusted to a system, and systems to one another, and to a whole, that, by stepping aside for a moment, a man exposes himself to a fearful risk of losing his place forever. Like Wakefield, he may become, as it were, the Outcast of the Universe.