Why can ducklings move alone soon after birth

In the documentary, we can see such scenes: the newly born ducklings can walk and swim with their parents; The swallow under the eaves can't even open its eyes after coming out of the shell. It can't leave the nest until more than 10 days after birth. Ducks and domestic swallows are birds. Why are their children so different?

Newly hatched birds can be divided into two basic types: early formation and late formation according to their ability to forage, move and maintain body temperature. Early formed birds have their eyes open when they come out of the shell, and there are feathers on the body surface. After a few hours, they can follow their parents to eat. Chickens and ducks are typical early birds. Most passerine birds, such as domestic swallows, are late maturing birds. The newly hatched birds have closed eyes, naked body surface, unable to maintain a constant body temperature, and all food is provided by their parents.

Between these two types, there are also some transition types, such as gull chicks, which have sparse fluff when they come out of the shell and have certain activity ability, but they basically stay near the nest and belong to half early formation. Therefore, different birds will have different development types, which is the result of long-term adaptation and natural selection of different species to the environment.