Why do flies rub their legs together?
When you see flies sitting on the windowsill rubbing their legs together, they are cleaning themselves. Flies rely on their compound eyes, antennae and the bristles on their bodies and legs to sense the world around them. They have to keep these sense organs clean so they can fly with precision to find food and mates and avoid predators.
Flies spend a long time carefully cleaning their whole bodies; if you watch them closely you will see that they don’t just rub their legs together – they run their legs over their bodies, heads and wings too. Particles of dirt from the rest of the body are picked up by its legs as it cleans, and then the dirt is rubbed down the legs and away.
Hannah Cornish, Angela Marmont Centre, National History Museum, London