We were sitting at the campfire when a May beetle (June bug) lumbered into the light. After circling the fire's perimeter a few times his flight path became more and more elliptical until he flew right through the heat column. The blast of heat knocked him to the ground about 4 or 5 feet away. He didn't move for a couple of minutes so I assumed he was dead. But then we heard a buzz and again he was airborne. His next sortie was even more awkward and he was barely able to remain aloft. Again he flew through the fire but this time he got badly burned and crumpled to the ground about a foot from the fire pit's edge. After lying on his back for awhile he slowly righted himself and used his last bit of life to laboriously approach the fire pit. With slow determination he crested the rock border and tumbled into the coals. I've never understood the moth and flame phenomenon. I thought insects were "programmed" to survive. Apparently the propensity for light is so strong that it supersedes the survival instinct. Why? This compulsion must serve some purpose but I sure don't know what it is. I think it's very, very odd.
Perhaps it's because fire is such a relatively rare phenomenon in the grand scheme of things. This, if you remove the artificially inflated occurrence of fire at the hand of man, a phenomenon that has been happening for such a short time on evolutionary timescales that there is no way evolutionary change could take account for it yet. The moth is obeying a light-following instinct that typically serves a different purpose and gets subverted by this rare event of fire.
Adding to what Wreybies said, it's essentially conservation of function. Losing a few members to the flame may not affect survival that depends on reproducing billions of members to get thousands of survivors who reach an age to reproduce again. So it's not a priority from a biological standpoint to evolve a mechanism to avoid the flame. Brains are very high in cost to an animal's or insect's biology. They most likely didn't evolve a nervous system with pain sensation. http://insects.about.com/od/insects101/f/Do-Insects-Feel-Pain.htm
That's very insightful, Wrey, and it makes perfect sense. Naturally occurring fire would be too rare to affect the evolutionary process. The light-following instinct may relate to sunrise or even to the moon. Perhaps those events are related in some way to mating or food sources. We've all seen moths clinging to the window screen of a lighted room. So it's not about heat. Ginger, thanks for the treatise on insect pain receptors. That would explain why they don't recognize the danger of fire. Apparently, the risk has no significance. And like you said, many are born so that a few might survive.
Since moths are generally, if not strictly, nocturnal and electricity is an evolutionary late-comer, let us, for the sake of conjecture, assume that the moon is a mating trigger. If all the light-seeking insects in a given area flew toward the moon there would eventually be a confluence providing mating opportunities. Plausible?
Strangely, this makes me remember something I saw on one of the edutainment channels concerning how roaches remain stable at high speeds without seeming to have the processing power (brains) to keep up with a hexapedal run of the speeds of which they are capable. It was determined that there comes a point where dynamic stability takes over where brainpower fails, the roach depending in accrued forward momentum and simple law of probability (or something to that effect) to keep it on an even keel as it dashes off. Completely plausible, though I cannot say for sure if factual without some more googling.
Not all that plausible given evolutionary time frames. For the record, insects, because they have so many offspring and a short duration to sexual maturity, evolve quickly. It's only animals like us that have few offspring which then take 15+ years to reach reproductive age that evolution is very slow with. Not to mention fire is not new to the planet.