In Pygmalion, why does Shaw attach the labels rather than names to the characters, and what is the social class of the three main characters?
The three main characters are The Gentleman, The Note Taker and The Flower Girl.
As part of Shaw's intent to instruct while he entertains, he introduces the three principle characters by labels rather than by names, as well as introducing Mrs. Eynsford Hill and Miss Clara Eynsford Hill by their labels of The Mother and The Daughter. The minor characters are also introduced by their labels, such as "Bystander," but it is not an uncommon practice to have minor characters designated as Girl 1, Girl 2, Shopkeeper, etc. The only character to get a name in Act I is Freddy, and perhaps he gets a name because he misbehaves by treading underfoot some of The Flower Girl's flowers then running off without paying for them. Perhaps Mrs. Eynsford Hill and Clara go without names because they provide the benchmark comparison to Liza's inner qualities and future achievements.
It may be that The Gentleman, The Note Taker (who are both upper class), and The Flower Girl (who is lower class) go without names at first so that the character development that occurs over the course of the play will be more dramatically pointed out and to emphasize their roles in life so that associations between them will be put into sharper relief (given sharper contrasts) . For instance, when Higgins changes from a note taker to an interacting human as he notices Liza for her true qualities and then falls in love with her, his development is more pronounced because all he was at first was just The Note Taker, nothing more human than that. A similar principle holds for The Gentleman but points out the idea that the supposed noblest in the land turn a blind eye to the humanity of the individuals in classes lower than their own. The Flower Girl is so called to point out how society views her--just a girl who sells flowers--and to emphasize the dramatic changes that unfold in her as the play progresses.