One of the more bizarre marvels of nature is the survival ability of a common housefly (Musca domestica) after decapitation. Contrary to popular belief, the reason a fly can continue to walk and even fly without its head isn't that its brain is located in its back, but it's due to the simplicity and spread of its central nervous system. Flies have a relatively decentralized nervous system, which means that losing their head does not immediately impede their basic motor and sensory functions.
The head of a fly houses its brains and several sensory organs, including compound eyes and antennae which are crucial for navigation and detecting food. However, when decapitated, a fly's body can still perform certain reflex actions. This is because the control of these reflexes is spread throughout nerve ganglia located within segments of the body. Essentially, different segments of a fly’s body can operate independently to some extent due to these localized clusters of neurons that control movement and reflexes.
Moreover, with the head removed, certain autonomic functions continue. The decapitated fly can still flap its wings if properly stimulated because these motions are controlled by nerve circuits in the thorax, independent of the brain. The abdomen of a fly may also continue to show peristaltic movements. However, without the head, a fly's lifespan is drastically shortened. The fly cannot eat without its mouthparts and will eventually die from starvation.
Decapitated flies exhibiting basic survival behaviors underscore the remarkable adaptability and the rudimentary yet effective neural setup in insects. This phenomenon also provides a unique perspective into the study of nervous systems, offering insights into how motor functions and sensory inputs are processed and controlled in simpler organisms. Although the sight of a headless fly walking or flying might be unsettling, it's a compelling example of the resilience and physiological quirks in the natural world.