Fruit flies are attracted to drains because they offer a warm, moist environment where the flies can lay their eggs. The larvae hatch and feed on the organic matter that collects in the drain. Once they mature, the adult fruit flies emerge and begin their search for mates. While fruit flies are not known to transmit diseases to humans, they can be a nuisance because of their constant buzzing and their attraction to food.