But I think fruit flies still make a fair case for spontaneous generation. The first time I had an opportunity to ask a fruit-fly expert where the fruit flies in my kitchen came from, he got very defensive and insisted that, despite what his neighbors claimed, they didn't come from his genetics laboratory. I later saw his laboratory, and while I would have sided with his neighbors, it turns out fruit flies are wild animals. They come from outdoors. They come when they smell your peaches rolling across the ripeness line. .
Fruit flies prefer a diet of yeast, that marvelous microbe that eats fruit and spits out alcohol.
Since flies disdain unripe fruit, and since that is precisely the sort of colorful paperweight that supermarkets tend to distribute, it's more likely that your Drosophila melanogaster came from the great outdoors than from the grocery store. And once they're established in your house, they can sustain themselves on an impressive range of nutrients. They can live on the slime inside a sink drain. They can flourish on a sour mop. They'll eat damp flour or food fermenting quietly in a crack in the floor.