1.) due to the use of contaminated water in making of food.
2.) spoilage of food by micro-organisms which sit on food.
There are various factors which are responsible for food spoilage. They are- Temperature, light, Microorganism, enzymes and chemical reactions. Food and water that we consume may get infected by germs. Flies carries those germs. When they sit on our food, they pass on these germs to our food. Thus food gets contaminated and spoiled.
Regards