In the country, it has to do with when it gets dark. Chickens don’t much care whether they are eating dirt, or bugs, but the bugs are more nutritious.
Instead, they are aware, in their dim instinctive crevices of brain-wrinkles, that predators will be able to see them before they see the predators. So with the waning light, they seek shelter.
In industrial coops, the lights are kept on. The chickens continue eating, and getting fat. There’s a lesson in there for us as well.
There sure is. Shut off the lights, remove the mirrors, and take the light bulb out of the fridge so every time you get a cold snack, you'll be surprised about what it is...
(hehehehehehehe)