About 200million years ago some things crawled out of primeval swamps and evolved into mammals and insects as well as a lot of other species.
Over the following 190million years evolution played its part and some of the insects and mammals became nocturnal whilst others used daylight.
The nocturnal creatures evolved in different ways, some with large eyes (owls), some with radar (bats) some with enhanced senses of smell and hearing (hedgehogs).
So why is it that, after 190 million years of evolution, the moth, which has evolved its sense of direction in the darkest night by using the moon, throws itself through the open patio window as soon as I switch the kitchen light on and then persists in flying round and making a nuisance of itself?
I am so glad that the cows in fields near to us are not nocturnal.