In Araby, why do you suppose Joyce put him in this family setting rather than some other?
"Araby" is a "coming of age" story, and since every child comes of age at least in part by distinguishing himself/herself from the family and its influences, it is very appropriate that the protagonist be depicted in his environment of origins, which includes his family as well as his neighborhood. That the street on which he lives is "blind," that his family's house had a tenant who was a priest, and that the narrator offers at the beginning a description of the children on the street all contribute to the development of the protagonist. In addition, a family member, the uncle, gives the child a coin while telling him, "All work and no play makes Jack a dull boy," indicating the influence of the family on this child's adventure into the larger world.
In addition to what is mentioned above, consider the focus of this protagonist. He is attempting to live beyond his knowledge, having very little understanding of the world around him. He lives in a dream of courtly love, caught by by carnival tales that excite and allure him. His setting of a low socio-economic Dublin family support his ignorance of worldly conditions. He has been sheltered by his situation and lack of education. Without first believing that, readers would not believe in the effect the carnival has on him.