system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do bugs like moths and flies love light sources so much?
gpt
A lot of bugs navigate by keeping the sun at a constant angle. 

You can simulate this by going outside and pointing at the sun, then walking while not moving your arm and keeping your arm pointed at the sun. You'll walk in a straight line (so long as the sun isn't directly overhead). 

This works because the distance to the sun is so utterly massive it makes the distance you walk insignificant. 

If you instead repeat this experiment with a nearby artificial light source, like a lamp, then you'll find that you walk in one of three paths:

* If you are pointing directly left or right then you'll walk in a circle. 

* If you're pointing straight forward or backwards then you'll walk straight towards or away from the light. 

* If you're pointing any other direction you'll walk in a spiral. Directions towards your front will be an inward spiral, while directions towards your rear will be an outward spiral. 

When bugs navigate in this way they're not drawn towards the light per se. It's just that about half of all directions they could try to fly in result in spiraling in towards the light.