Why are moths drawn to light?
Some types of moths are known to migrate, and it’s possible that the night sky gives them navigational clues. A moth’s up-down orientation might depend in part on the brightness of the sky relative to the ground. Some lepidopterists (moth and butterfly scientists) suggest that moths use the moon as a primary reference point and have the ability to choose their flight paths as the Earth’s rotation causes the moon to move across the sky. (There is even evidence to support the theory that migrating moths have an internal geomagnetic compass system to guide them in the right direction.) So a moth’s attraction to an artificial light or to a fire could be related to orientation, and lead to disorientation — the moth wasn’t “expecting” to actually get to “the moon” (the light source) or to be able to fly above it, so confusion results.