are drain flies attracted to food?
The flies are naturally attracted to the odors created by decay and fermentation as they indicate a potentially good food source for their larvae (“maggots”). ... And these small flies need this decaying organic matter to deposit their eggs.