Why does everyone in the city have to be aware of the existence of the child?
Everyone in the city knows of the child who is locked away, living in filth and subsisting on corn meal and grease; some people come to see the child and others never do, but they are all aware of its existence. The narrator says,
They all know that it has to be there. Some of them understand why, and some do not, but they all understand that their happiness, the beauty of their city, the tenderness of their friendships, the health of their children, the wisdom of their scholars, the skill of their makers, even the abundance of their harvest and the kindly weathers of their skies, depend wholly on this child's abominable misery.
Therefore, it appears that none of the good and wonderful and beautiful and happy aspects of life would be possible without some knowledge of the harsh and terrible and ugly and miserable aspects of life. The light cannot exist without the dark, and so everyone in Omelas must be aware of the child's misery so that they can truly understand and appreciate their own happiness. The narrator, in this vein, continues, saying,
If the child were brought up into the sunlight out of that vile place, if it were cleaned and fed and comforted, that would be a good thing, indeed; but if it were done, in that day and hour all the prosperity and beauty and delight of Omelas would wither and be destroyed. Those are the terms.
The people can convince themselves that the misery of this one child, when weighed against the absolute gorgeous happiness of thousands of others, is minor. Misery must exist somewhere, and without this child's misery, it seems, everyone would have to accept their share of it. The child's misery, and the townspeople's knowledge of it, are what make possible their perfect happiness because we cannot know one without the other.