Like any self-respecting artist, the protagonist of "A Hunger Artist" sees himself as a class apart from the rest of society. He doesn't subscribe to society's dominant value-system, which he sees as irredeemably bourgeois and philistine. At the same time, however, he relies upon the society he loathes to provide him with an audience for his very public form of performance art.
His hunger is not just physical hunger, hunger for food, but spiritual hunger, hunger for recognition of his remarkable artistic feats. But so long as there's a barrier between himself and society—as symbolized by the cage—the artist will never gain the recognition that he believes is his due:
Sometimes there were nightly groups of watchers who carried out their vigil very laxly, deliberately sitting together in a distant corner and putting all their attention into playing cards there, clearly intending to allow the hunger artist a small refreshment, which, according to their way of thinking, he could get from some secret supplies. Nothing was more excruciating to the hunger artist than such watchers. They depressed him. They made his fasting terribly difficult.
Though the cage traps the artist, it also keeps him secure. The audience may jeer at him, may accuse him of only pretending to fast, but at least they cannot get to him, and this means that the cage, for all its alienating qualities, does at least protect the hunger artist.
In that sense it's a kind of comfort zone, a place where he can feel relatively safe from the harsh world outside. And the main reason for this is that the hunger artist knows something that the audience don't know and don't want to know: that fasting is actually quite easy or so the hunger artist says:
It was the easiest thing in the world. About this he did not remain silent, but people did not believe him.