The wonderful thing about literature is that everyone can get a different message from the same story. However, the purpose of the author writing the story can be found within the themes, character relationships and the points of view from which the story is told. Pygmalion is written from Liza's perspective, mostly; although, there are insights to others' perspectives as well, like that of Mr. Doolittle when he proclaims that he has lost his happy life when he enters the middle class.
So if you were to find the purpose of Shaw's writing through Liza's eyes, you might find some interesting questions about male-female relationships, platonic relationships, and how people can (should) treat one another. The social class system is called into question as money plays a role between those who have and those who don't. Also, an examination of how men treated women during the turn of the twentieth century is delivered in astonishing fashion from the perspective of two old bachelors.
The study guides and links below will provide you with further insight to the author's purpose.