Although Cory is rich and of an elite class, he kills himself because he is unhappy.
The poem begins describing Richard Cory as a rich gentleman. The speaker of the poem is one of the townspeople and he says, "we thought that he was everything to make us wish that we were in his place." This envy from the townspeople does not cost him his life. But it surprises the townspeople because they thought they wanted to be him, however, they do not want to be dead like Cory is at the end of the poem. It is ironic because his unhappiness is unexpected since he came across as though he was happy because of his money.