I have never quite viewed this gem of a poem quite like others. It seems there is more in what is unstated than in what is given in the 16 lines E.A. Robinson chooses to give.
Interestingly enough, the reader knows very little about Richard Cory except what the townspeople see. There is no evidence that he is warm and kindly to the townspeople. Yet to them, he is a "gentleman from sole to crown," and he is physically appealing as well; the narrator tells the reader he is "Clean favored, and imperially slim." That first verse says nothing about goodness or kindness. There is no hint that he has any friends. He is simply observed by others. Preceding verses never mention any social relationships either.
He is friendly enough when he says "good morning," and he "glittered when he walked," but one presumes he walks alone.
But what the townspeople really envy is his wealth, "yes, he was richer than a king," which made people "wish that [they] were in his place."
In the final stanza, poor, lonely Richard Cory "Went home and put a bullet through his brain." The townspeople were not mistaken about Richard Cory. Everything they saw was right. But it is what they didn't see. There is clearly an emptiness, a loneliness, an alienation about the descriptions of the man. E.A. Robinson tells more about Richard Cory with what he leaves out of the poem than what he includes.
Sadly, the townspeople fail to view their own lives as having value because they lacked what Richard Cory had in his life. Maybe with his death, the townspeople will realize they are mistaken about their own lives. Nobody in that town knew Richard Cory, and Richard Cory knew none of the townspeople.
One can presume, therefore, that the poem is a scathing satire on the idea that wealth and good breeding can bring joy and purpose to one's life, and that lack of "meat" and the struggle to earn "bread" (money?) may not suggest an empty life. Economics may have little to do with a satisfying existence.
They were mistaken about him because they thought that it would be great to be him.
If you look at the whole poem -- all the way up to the end -- it seems that Richard Cory has it all. He really impresses everyone who sees him. He is graceful and he dresses well. He is rich. He is a nice guy. Everything about him is perfect. The people of the town see this and they believe the outward looks.
But then Cory goes off and kills himself. This shows the people were clearly wrong -- it wasn't so great to be him.