As scientists develop robots with more and more recognizably human traits, you still probably wouldn't expect one to puke.
Researchers at the North Carolina State University actually found a reason to build one that mimics human retching. They wanted to specifically see how the norovirus is spread.
As Science Magazine writes:
Previous anecdotal evidence has suggested that virus particles—specifically norovirus, the leading cause of acute gastroenteritis in the United States—might go airborne in the process of puking. But according to food virologist Lee-Ann Jaykus of North Carolina State University in Raleigh, "nobody had ever proven in a lab model that the virus can be aerosolized by vomiting."
To rectify that, Jaykus and her team built a miniature "vomiting machine," a quarter-scale model of the human digestive system complete with an artificial stomach, esophagus, and mouth. They designed it to mimic all the pressures and volumes present in hurling humans and then inoculated its "stomach" juices with a virus called MS2 (which is similar to the size, shape, and composition of norovirus but not dangerous to humans).
There's a whole video explaining the machine and its uses, but this is the only thing that you probably want to see:
Here's the whole video if you're just a stickler for knowing all you can about your vomiting robots.
As Vox helpfully points out, this is far from the first gross machine that science has built.
British scientists built 'Vomiting Larry' to study projectile vomiting.
Then there is the 'Cloaca machine', which is a replication of the human digestion system. It actually makes feces.
AKA Poo Bot.