Many of the characters in Joyce's Dubliners lead what Thoreau once called lives of quiet desperation. To a large extent, this is because, for one reason or another, they are alienated from the society in which they live. Early twentieth-century Irish society, as depicted with such grim precision by Joyce,...
appears to have been especially conducive to this state of mind, at least for those like Joyce who felt at odds with their surroundings.
In “A Little Cloud,” Chandler is alienated, not just from society but also from his family and his place of work. Trapped in a job he despises, and lacking a close connection with his family, he is isolated and lonely. This feeling is compounded by the relatively rich and exciting life led by his friend Gallaher, who's managed to forge a good career for himself as a journalist in England.
It's notable that Gallaher only managed to achieve success by leaving Ireland, whereas Chandler, who's remained, is stuck in a rut. This is in keeping with Joyce's main theme in Dubliners, that contemporary Irish life was marked by cultural and intellectual stasis.
In another story in the collection, “A Painful Case,” Mr. Duffy is also alienated from the society in which he lives. Only in this case, he has chosen to cut himself off from other people and deliberately maintain as little social contact with others as possible.
This explains why Duffy responds negatively to Mrs. Sinico's advances. Due to his self-enforced isolation, he's not prepared to take the plunge and forge an emotional connection with another human being.
The consequences for both parties in this would-be romantic relationship are tragic; Mrs. Sinico kills herself, and Mr. Duffy becomes acutely aware, perhaps for the very first time, of his crushing sense of loneliness.
The contrast with Chandler in “A Little Cloud” is instructive. Even though he does have human connections in the shape of his friend Gallaher and his wife and child, he is still alienated all the same. What Joyce seems to be driving at here is that even if one has friends and a family, even if one has human connections, it's still all too easy for people to feel lonely, isolated, and estranged in contemporary Ireland.