Theory is, Interle that some birds bob their heads to stabilise their vision.....we do it with eye movement...they do it by head bobbing......
Why some and not others? I don't know.....x
They each have their own individual gait so that birders can
identify them either because they are too far away or, as in my case their sight isn't what it was.
Seriously, to answer it properly I think would take a Ph.D investigation because of all the complications of evolution, habitat and diet etc.