I refuse to pardon the pun! You shall burn for it!
Moths are positively phototactic (Phototaxis is an organism's automatic movement toward or away from light.) unlike roaches which are negatively phototactic.
Nobody ACTUALLY knows why this happens but there are theory's. Some scientists believe it is due to them (possibly) using the moon as a reference when migrating so they automatically get sucked towards a more empowering light without knowing it. Another idea is that light means saftey, when a group of moths are frightened they fly to the sky (which is rather bright), so it is theorized that they might associate light with protection.
As to why moths STAY at the light is also quite the mystery. Some scientists believe that much like humans, when you stare at a light you are temporarily blinded right? Causing disorientation and making it so you have to be stationary and wait for your eyes to adjust, well moths take a lot LOT longer to adjust. Or, because moths are nocturnal flyers, they think the light is the sun and go to sleep for the day and wait for the light to go away for them to continue flying.. stupid bugs.