The main contextual factor that has resulted in the evolution of the Pygmalion myth is the widespread belief across different cultures that the identity of women is largely shaped by men.
In the original myth, the sculptor Pygmalion falls in love with his own creation, Galatea, the lifelike statue of ivory he made with his bare hands. But he soon realizes that Galatea, though a very beautiful statue, is nonetheless still only a statue. And so he begs Aphrodite, the goddess of love, to turn the statue into a real woman, which she duly does. The two get married and live happily ever after.
In George Bernard Shaw's updating of the myth, we see Professor Henry Higgins exercise what he sees as the fundamental right of men to shape and control women for their own ends, much as Pygmalion had done with his statue. To this end, he conducts an experiment by teaching Eliza Doolittle how to speak and act like a "lady," one that would be accepted by high society.
In Higgins's hands, Eliza—the society lady version of Eliza, at any rate—is almost as much of a statue as Galatea. Higgins believes that she is his creation. When he found her, she was a poor girl selling flowers. And though Higgins did teach her how to speak standard English, he neglects to acknowledge Eliza's own achievements and intelligence. Eliza knows this, and she ultimately leaves Higgins for good, resolving to take all that she has learned and the confidence she has gained to open her own flower shop.
Here we see a slight evolution of the tale: though Higgins constructs Eliza's new identity for his own needs and attempts to control her, she rejects this notion, even threatening to run him out of business as his competitor.