To discern a moral lesson from a story such as "Araby," you would first need to think carefully on the core themes that are layered within the story. At the same time, it might be worth asking whether this story even contains a moral message at all. When looking at literature, it is actually quite common for authors to try to depict life in all its complexity without necessary trying to impose any kind of moral judgment on it.
In the case of "Araby," Joyce tells a coming-of-age story, with its thematic architecture centered around themes of disillusionment. Its protagonist, a young boy, believes himself in love with the sister of his friend, Mangan. Hoping to impress her, he is determined to attend the bazaar and bring her back a gift, and he proceeds to build up this excursion in his mind. As the story ends, however, the reality of his excursion proves a bitter disappointment.
With that in mind, what is the moral lesson of this story (if there even is a moral lesson at all)? Given its themes of disillusionment, one moral lesson you might pull from "Araby" lies in the importance of setting aside rose-colored glasses in order to see the world as it really is.
However, at the same time, you might also focus on the protagonist's infatuation and the degree to which he was focused on the idea of Mangan's sister rather than the reality of who she was. In this case, one might suggest that the story contains a moral lesson regarding objectification. Ultimately, Mangan's sister is not a passive object that exists for the purposes of being admired or being won, but is a person in her own right. However, the narrator is so caught up in his infatuation that he does not realize the disservice he is doing.