By anyone's standards, the transformation experienced by Eliza Doolittle in Pygmalion is truly remarkable. At the start of the play, she's a humble Cockney flower-seller, struggling like so many of London's working-class people to make ends meet in a harsh, unforgiving society that looks down on the poor and dispossessed.
Yet by the end of proceedings, it's no exaggeration to say that Eliza is like a whole different woman. Thanks to the patient tutelage of linguistics expert Henry Higgins, she can now pass for a lady in polite society, where her cut-class accent completely fools people into thinking that she's of a higher class than she really is.
On the whole, then, Higgins can be well pleased with his work. At the same time, Higgins possibly Eliza as a kind of Frankenstein's monster in that she has become more assertive and independent-minded as a result of this experiment, something Higgins never intended.
No longer willing to be controlled by Higgins—or any other man, for that matter—the newly-confident Eliza asserts her independence and leaves him. Though Higgins is smugly confident that she'll come back to him, it's fair to say that he didn't plan on her walking out on him in the first place.