The suffering child in LeGuin's story "The Ones Who Walk Away from Omelas" is the scapegoat for the misery of others, so that the others are able to live in comfort and happiness.
The concept which LeGuin explores in this work of philosophical fiction is that of the greater good, a concept explored in William James's The Moral Philosopher and the Moral Life. In this work James writes on a supposition that one person might be able to absorb the pain, illness, and misery for all others:
Or if the hypothesis were offered us of a world in which...millions [could be] kept permanently happy on the one simple condition that a certain lost soul on the far-off edge of things should lead a life of lonely torture....
This miserable creature that is confined is essential to the comfort of all the others in the community. In Omelas, then, all the "goodness and grace of every life...." depends upon the condition of this child imprisoned in a basement of one of the attractive public buildings. This miserable creature must be kept there for "the greater good" that allows others happiness and comfort.
When children reach the ages of between eight and twelve, they are brought to see this isolated creature, and all are shocked at the sight. But they are instructed that if something were done for this miserable creature, the "beauty and delight" of Omelas would wither and die. Only by exchanging all the goodness and grace of every life in Omelas can the single child's life improve. While some residents of Omelas are so disturbed by the discovery that they "walk away from Omelas," departing into the unknown, others become reconciled to the idea that one life where evil is contained is worth the happiness of all others. Further, they feel that even if the child were released, it has been degraded for so long that it "would not get much good of its freedom," anyway, because it has become "imbecile."
With this vagueness of position at the end of LeGuin's allegory, the readers must, then, draw their own conclusions of the author's particular illustration of Pragmatism.