Flies are part of the insect order Diptera which means two wings.
prefer to lay their eggs in fermenting fruit, vegetables or other organic matter
Flies are in this order such as the common House Fly, Blow Fly, Gnats, and Mosquitoes. All the species in the order Diptera have developed halteres which are balance organs where the second pair of wings used to be.
The Fly most commonly referred to as the Fruit Fly may be identified as these four species Tephritidae, Drosophilidae, Drosophila, and Drosophila melanogaster, that prefer to lay their eggs in fermenting fruit, vegetables or other organic matter. Many species of Fruit Fly will reproduce and are attracted to moisture and water sources can include wet towels and uniforms in a commercial kitchen to your drains in your sink and can find a permanent food source from the build up in your drains and p traps.
It is very possible for even the cleanest person to forget about the old sack of potatoes pushed far back in your cabinet, onions and other vegetables not stored in the refrigerator over time can easily develop Fruit Fly adults and their babies!
When you move into a place unless it is brand new there was someone there before you, depending on the situation these people may have developed a pest problem and left the problem without calling a pest management professional! Everything they were dealing with during their stay may be still there!