Shaw changed the ending from the play
In the play, Shaw does not end it with the coupling of Henry Higgins and Eliza.
As Eliza leaves for her father's wedding, Higgins shouts out a few errands for her to run, assuming that she will return to him at Wimpole Street. Eliza, who has a lovelorn sweetheart in Freddy, and the wherewithal to pass as a duchess, never makes it clear whether she will or not.
The onstage drama ends, and Shaw narrates, in an epilogue, that Eliza recognizes Higgins as predestined to be a bachelor; she marries Freddy instead. With a gift from Colonel Pickering, Eliza opens a flower shop. The only person truly bothered by this state of affairs is Clara, who decides that the marriage will not help her own marriage prospects. But then she begins to read H.G. Wells and travel in the circles of his fans, and she is convinced to begin working in a furniture shop herself in the hopes that she might meet Wells (because the woman who owns the shop is also a fan of his). Freddy is not very practical, and he and Eliza must take classes in bookkeeping to make their business a success. They do reach success, and they live a fairly comfortable life.
I wonder if Shaw changed it because he thought it was a better ending, or to satisfy a cinema (at that time) public more sentimental and wanting a "romantic" ending between the two main characters? If anyone knows more about this, please post.