This is an example of the "Following Response" which was first described by Konrad Lorenz, one of the 3 European founders of ethology (the study of animals' behavior in their natural environment).
The FR is a result of "imprinting" which means very strongly learned, almost irreversible responses, rapidly learned during a defined "critical period" very early in a young animal's development.
Various species of ducks and geese imprint different behaviors -- the behavior depends on the particular species.
One is the FR which occurs in nudifugous (nest fleeing) ducks. The young duckling is attracted to and follows the first moving object it sees during, say, its first 24 hours. Almost always this is the mother so the duckling follows her (ducks in a row). But the FR also involves attachment and species identification (what species am I, with which species should I mate?).
Eckhard Hess in the 1950s did a series of brilliant laboratory experiments on 1 species of ducklings. He constructed a circular track (say 3'/ 1 m) in diameter which had various objects that moved continually circling the track and which ducklings of various ages could follow.
Hess placed ducklings of various ages (in the first 24 hours of life) on the track to measure the strength of the FR as a function of age and object followed. He found an extremely steep peak at about (IIRC) 12 hours age with a rapid drop off for hours after that. Hess found little difference in strength of the FR whether the duckling followed a colored cube or a realistic model of the mother. Different waterfowl species imprint attachment behaviors (have critical periods) at different ages.
This imprinting results in acquisition of a FR which serves to move the ducklings in a row following their mother to water. And it also results in the formation of strong attachment bonds.
Obviously, the duckling in the linked video has been imprinted on and has strong attachment bonds with its owner.
Scott & Fuller describe their series of long term experiments on the issues of genetic differences (5 different breeds of dogs) and early developmental periods in their monumental book "Genetics and the Social Behavior of Dogs" They discovered similar "critical periods" (AKA "sensitive periods") in dogs. These periods are slightly later than with waterfowl but they also cover such things as social attachment.
The last chapter of their book gives a readable, excellent summary of their work and is available through interlibrary loan from public libraries (all university libraries have this book).
The publications of Hess along with Scott & Fuller's work -- both working in the traditions and techniques of comparative psychology -- were probably the most instrumental in opening the eyes of American psychology to the importance of ethology and that there exist VERY important factors in behavior other than American psychology's obsession with traditional reinforced learning in determining behavior.
Might you guess, this is a topic that's long been of great interest to me and which I've much enjoyed teaching in psychology courses?