A mating pair of Drosophila melanogaster. Source.
Back in 1983, researchers at Yale borrowed a microbiological tactic to study evolution at a "single gene locus" in a multicellular animal—the use of altered growth media to select for nutritional mutants. They confronted populations of Drosophila pseudoobscura with a growth medium containing either maltose or starch as the sole carbohydrate source and observed inherited changes to the α-amylase allozyme frequencies and the enzyme's location within the gut in the "starch flies." Interesting, useful, but not revolutionary.
A few years later a Yale Ph.D. student working with the same flies reported something unexpected. Looking at populations that had been reared on the maltose or starch medium for a year, she found that starch flies preferred to mate with starch flies rather than maltose flies, and likewise the maltose flies preferred maltose mates. In her paper she concluded that the new behavior was a pleiotropic by-product of the adaption to the different media.
And so the matter rested for about two decades until revisited by a group of five researchers from Israel and one from Maine, with some most intriguing—and microbial—insights. (You knew that there had to be a microbe lurking somewhere. Otherwise I wouldn’t be writing about fly mating behavior here.) In their recent PNAS paper they present evidence that the flies raised on different food sources harbor different populations of bacterial commensals, and that it’s these microbes that are the matchmakers.