Howard Roark, the hero of this novel, reflects Rand's belief in objectivism, individualism, and the virtue of selfishness. As the novel says, “Every major horror of history was committed in the name of an altruistic motive. . . ." Pity would clearly fall into this category of "altruism." In Rand's and Roark's worldview, pity undermines people by telling them they need to be helped, rather than help themselves. When we pity people, we teach them they are incapable--or worse yet, we recognize them as incapable, a terrible fate to befall a person.
In the context of this particular quote, Keating, whose name conjures "weakling" and "bleating," has just shown Roark six of his canvases. Roark sees they are no good and tells Keating so. Roark then feels "sick with pity." As he feels this pity, he understands it as the "awareness of a man [before him] without worth or hope." Pity, to Roark, carries "shame ... that he should know an emotion which contained no shred of respect." It is then that he decides there must "be something terribly wrong with a world" in which pity is called a virtue. To Roark, pity means contempt.
Roark, an architect usually thought to be based on Frank Lloyd Wright, has a unique gift, and he doesn't want pity or other forms of altruism sent his way to weaken him or to tell him he is worthless or hopeless and he feels sick when he has to pity others. As we can see from his response to Keating, being respected is extremely important to him, as is his freedom to follow his own path. He makes a passionate case for his philosophy of selfishness, which shows a marked rejection of pity, saying:
I do not recognize anyone’s right to one minute of my time. Nor to any part of my energy. Nor to any achievement of mine. No matter who makes the claim, how large their number or how great their need . . . I recognize no obligation toward men except one: to respect their freedom and to take no part in a slave society.
As Roark says to Gail: "I'm not an altruist ... "