Probably for different reasons. Moths for example naturally fly towards the moon, using its light as a tool to find one another and to mate. Other lights confuse them.
other web sources say the moths fly toward an artificial light because they navigate using the moon, by pointing their head toward it. When encountering an artificial light (with a fairly small intensity, similar to the moon, as opposed to the high intensity of the sun) they point their heads towards artificial lights which (being much smaller scale) make them fly in circles, thus the confused moth appearance. haa ha, kinda neat huh.