Every summer you probably wonder why it is moths fly toward artificial light sources. Basically, the answer is the moon and stars.
Moths, along with butterflies, belong to a group of animals collectively known as the Lepidoptera. Now, Lepidoptera aren't particularly good with their eyes. While they use vision for some tasks, such as recognizing flowers or finding mates, mostly they gather information by way of highly sensitive antennas and taste receptors located on their feet.
Now think about what the world was like millions of years before porch lights existed. If you are a nocturnal species like a moth, there isn't much light around to use. In fact, the only regular source of light would be the stars and the moon.
Moths seem to use light only as a way of telling which direction is up. If you fly toward the moon, there's no danger of bumping into it, but you will succeed in flying up into the air instead of down into the ground.
- Why Are Moths Drawn To Artificial Light? (LiveScience)
- Moth Smashes Ultrasound Hearing Test (Scientific American)