system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: If mosquito's are attracted to light. Why don't they all fly to the sun and leave us alone?
gpt
Because that's not what's really going on. Insects use the sun or moon to navigate -- keep the light in the same relative position and they'll keep going in the same direction.

This works with the sun or moon because their relative position isn't going to change very much as the insects fly. But insects can be confused by man-made light sources, and these do change position as the insect flies past them.

So... insect flies past a street light and the position changes. Insect adjusts course to keep the light in the same relative position. As this process repeats, the insect winds up spiraling inward toward the light until, finally, boom -- they wind up flying into it.

They aren't attracted to light and, in fact, that would be a bad thing for a nocturnal predator to do. They're just confused because street lights and the like don't behave like the sun or moon.