I actually didn't know this before. Last night I looked up the reason why fireflies light up (besides the fact that I believe that God designed them that way) and I found this response. I wonder if anybody else knew this. It's actually rather amazing to find out that there are still so many different things out there that we don't know.
https://www.scientificamerican.com/article/how-and-why-do-fireflies/
https://www.scientificamerican.com/article/how-and-why-do-fireflies/