While reading Hemingway's "Hills like White Elephants," I questioned a comma he inserted before a clause beginning with "to," which I emboldened below. Is this construction necessary as a grammatical rule, was it used as an indication of a pause, or was it both?
"What did she say?" asked the girl.
"That the train is coming in five minutes."
The girl smiled brightly at the woman, to thank her.