Author's purpose in the given excerpt:
The author’s purpose seems to be presenting the fun and excitement and ‘the craving’ for ‘only the desired thing and nothing else’ innocent and funny display peculiar to childhood sometimes even portrayed by adults. He also wants to show the ingenuity of the mind when the ‘she’ character cooks a vegetable and cheese cookie and makes the cookie monster eat it.
The realism in the dialogue makes the whole situation believable. The many ways to cook a cookie impress the reader with its novelty of perspective and the cleverness of the cookie-maker in the way she creates a sumptuous cookie out of broccoli and cheese and succeeds in making the monster eat it impresses.