It is Professor Higgins who wants to teach Eliza, not the other way around. He sees her as an interesting experiment – a challenge to prove his theory that he can transform anyone into a lady through the power of language and speech.
Eliza, initially reluctant, eventually agrees to the lessons, but not out of genuine desire. She sees it as a means to a better life, a chance to escape her poverty and become independent. However, as the play progresses, the relationship between Eliza and Higgins becomes more complex, and their individual motivations become intertwined.
Let me know if you have any other questions about "Pygmalion"!