Andreas Keller (2007). Drosophila melanogaster's history as a human commensal Current Biology 17: R77-R81.
While looking thru the old numbers of Current Biology, I found this interesting essay (pdf) on the fruit fly Drosophila melanogaster and its close association with humans.
Drosophila melanogaster and its 8 sister species form the Drosophila melanogaster group. All but 2 have so far been found only in the tropical Africa and are believed to be endemic there. This implies that the remaining 2 species, D. melanogaster and D. simulans, which are cosmopolitan, also originated from the same region of Africa.
Like the house mouse Mus musculus, D. melanogaster owes its present worldwide distribution to its attachment to humans. Unlike the mouse, however, D. melanogaster appears to be a relatively late comer. It was 1st recorded in North America in New York in 1875. Nevertheless, the fly's spread in northeast U.S. was quick and by 1915 it had arrived acrosss the continent in California.
(Fig. 3 from Keller, 2007.)
Keller doesn't mention when D. simulans was introduced into North America.
All species in the Drosophila melanogaster group breed on fruits. In addition, D. melanogaster has been bred from foods it is unlikely to encounter in its ancestral home in Africa, such as canned fruits, cider mill refuse, raspberry vinegar, tomatoes and potatoes.
I found this one wet in my bathroom sink. I took it outside and while it was drying itself, photographed it. It is probably Drosophila melanogaster.
Besides being more catholic in their food preferences, what other factors may have contributed to the successful infiltration of human societies by D. melanogaster and D. simulans? Keller mentions their short generation spans and the capacity to produce lots of offspring and tendency to enter human settlements. The latter undoubtedly helps them survive cold weather.
I think there are also the factors that prevent D. melanogaster from turning into a pest: they are small, they don't bite and they don't seem to spread any human diseases. Consequently, they either go unnoticed or ignored and tolerated.