This is a very good question. There are a whole pile of answers to this thread that basically say “instinct.” But that doesn’t really mean anything. What do we mean when we say instinct? Is it some sort of neurological pathway that forms during embryogenesis? Or maybe it’s something that develops at different lifestages. Can it be hormone mediated? If so, can we manipulate instinct? Perhaps it is actually a learned behavior based on based on a mother’s stereotyped dance that we have not yet developed the ability to observe. There could be any number of answers to this question. Is instinct the same thing from one species to another? Is the instict for nest building, bird migration, butterfly migration, etc all explained by the same mechanism?
You’ve asked one of the big questions of natural history/ethology/neurology/developmental biology…
Latest Answers