We don’t like to think about it, because we associate it with sickness, but we, and at least some other mammals and birds, use it as a way to rid ourselves of noxious materials. Very useful! But here I want to present another perspective.
More pleasantly, there are other important functions for regurgitation:
1) It’s an way to carry food to your babies. Wolves and other wild canids can gorge on fresh meat, and trot home to a denful of pups whose begging sets of the regurgitative delivery of dinner. Gulls and some other seabirds regurgitate a yummy slurry of partly digested fish to young chicks. Finches, such as crossbills, siskins, and goldfinches, feed their young chicks a regurgitated paste of partly digested seeds, perhaps with a few bugs in the mix. Doves and pigeons feed their young on what is called ‘crop milk’, secreted in their crop and regurgitated to the begging squabs.
2) It’s a way to digest food more thoroughly. Herbivores such as deer, cattle, and sheep are ruminators: they swallow their food normally but later bring it back up to chew and swallow it a second time. This allows them to extract more nutrients from what they eat.
3) It’s a way to dump unwanted ‘ballast’—used, for example, by fruit-eating birds that free up space for more food in the digestive tract by getting rid of the seeds. At various times and spots along the Boy Scout trail, for instance, we have found compact wads of the seeds of mayflower (or false lily of the valley). Mayflower grows abundantly in some meadow areas along this trail; its little red fruits gleam among the grasses. A good-sized bird—probably a raven—had filled up on mayflower fruits and discarded the seeds in a tidy bundle. Seeds dumped back in the meadows have a chance to germinate, but those we found out on the sand beach were doomed to be washed out by the tides. Smaller birds, such as robins, can selectively discard large seeds after swallowing the whole fruit, allowing smaller seeds to pass through the gut. Seeds voided either way can be dispersed to new growing sites.

Owls and other raptors disgorge pellets of undigested bones and feathers of their prey. Considerable accumulations of pellets sometimes develop below a favorite perch. Way back when, I used to take my natural history classes out to collect owl pellets; their first response, when I reached down to pick one up and open it, was always ‘eeewww’ and ‘ick!’ But most students would eventually find it to be fun and interesting to dissect those pellets. We learned a lot about the kinds of prey that had been eaten, by doing a little forensic work on the jawbones, teeth, and sometimes entire crania we found in the pellets.