I believe the answer is : to create a believable space for Eliza and Higgins to meet.
In the play, all of the main characters are met/brought together because of the rainstorm. Freddy is looking for a taxi for his mother, liza is trying to sell flowers among people who seek taxi,the colonel buy liza's flowers, and Higgin is taking notes on Liza's accent.