The short answer is scentifically we dont know. However there are theories out there that try to explain this. One theory is that flies are attracted to light because of their migratory nature. Flies regularly travel long distances guided by starlight and the moon. Hence, a light bulb may act as a proxy moon. To fly north, flies keep the rising moon on the right shoulder. Trying to keep a porch light continually off your right shoulder results in pandemonium.
The theory of why certain insects such as some flies and moths are attracted to light is because they are mistaking it for the moon.
Evening insects have been evolved to navigate by using moonlight.
By keeping the moon's reflected light at a constant angle, these insects are able to maintain a steady flight path and a straight course.
However artificial lights make this difficult for them, as the insects mistake it for the moon. When they evolved to navigate by moonlight, artificial lights wouldn't exist until a very, very long time later, so they are currently unable to tell the difference. For now, until they evolve again.
flies do not land on white it dependson what it is
No, they are attracted to insects.
the reason why flies attracted to vinegar is its wet and the smell
no
Moths are known for being attracted to bright lights.
No flies generally aren't attracted to light but they are attracted to sugar water. More sugar than water.
yes
the garbage can attracted flies from all around
No. Flies are attracted to the cows dung.
Some blowflies and flesh flies are attracted to decomposing matter. The presence of these flies are usually considered during forensic murder investigations.
This is not really a behavior strongly associated with flies specifically, but lots of flying insects do seem to be attracted to artificial lights. The general theory is that it confuses them. They're attracted to the light, but when they get too close its intensity and heat repels them, so they wind up sort of circling it at a short distance.
No, they are not.