On the ground walking is the more efficient method of moving around i.e. uses less energy. So, birds which hunt for their food largely on the ground normally walk. However, for birds which live mostly in trees / bushes, walking isn't an option and so they tend to hop, even when they're on the ground.
Some birds will do both. Starlings hop occasionally.
So it's to do with their lifestyle? That makes sense.
Do you know why walking is more efficient for birds on the ground? After all, kangaroos find hopping a very efficient form of locomotion, and even chickens hop backwards to inspect the patch of ground they've just been scratching at.
Can hopping birds walk if they want to; or does their anatomy make it difficult or impossible?
It never occurred to me to wonder about these things before!
Just found this:
A bird moving along a telephone wire does not walk like a tightrope artist; instead, the bird will "sidestep," "switch-sidle," or "hop." Sidestepping (the way that people typically move along a ledge) involves alternately lifting each foot and moving it to the side while continuing to keep the same foot ahead. Switch-sidling means moving to the right or to the left by crossing one foot over the other in an exaggerated "pigeon-toed" step. Hopping, of course, requires moving both feet simultaneously.
When unconstrained by such a narrow perch, many birds walk or run using the alternating strides typical of most bipeds. Others, particularly small, arboreally inclined species, commonly hop. It is uncertain why hopping is more common in smaller birds. The evidence seems to point to economy of effort: short-legged birds move farther in a single hop than they do taking several steps, whereas it is more economical for larger birds, with longer strides, to move one leg at a time.
Although birds of the same taxonomic groups frequently share a common pattern of locomotion on the ground, the patterns often have exceptions. Most passerines hop, but others, such as larks, pipits, starlings, and meadowlarks, typically stride. Within the family Corvidae, jays hop whereas crows stride. Diverse species, including robins, ravens, and blackbirds, both hop and stride. Whether a physically unconstrained bird hops or strides is not just a question of anatomy; speed also affects choice of locomotion -- a hopper in a hurry tends to break into a run.
Leg length is not only related to locomotory mode but also associated, among other things, with foraging style. For example, among ground gleaners and waders, species with shorter legs forage in shallower debris or water. Some ground foragers (especially buntings, towhees, juncos, and sparrows) are more likely to use a method of foraging called "double-scratching," a maneuver involving little more than hopping in place. But here, too, there is no simple division between birds that hop, stride, and double-scratch. Some striders double-scratch and some hoppers do not.
Recording the locomotory patterns in local bird species in different circumstances could be helpful in determining, for example, the conditions under which birds that typically hop when on perches (such as jays, flickers, and House Sparrows) continue to hop when on the ground and under which conditions they do not."
Here are some other helpful links:
Seems the jury is still out on this one because there are a number of factors involved. The reason the bird needs to move for example. On the ground, which is more efficient, hopping or walking, when avoiding danger, moving fast for some distance, or moving slowly as when feeding? Even humans may "hop" backwards to avoid a speeding car when they have just started to cross the road; but to hop for any distance would be tiring and not very efficient (kangaroos are built differently - is it even possible for them to put one leg in front of the other in a walking motion with those huge feet?) Size of bird and length of leg and tail are additional factors.
Maybe the fact that most corvids walk but a magpie usually hops is to do with its long tail? Like the kangaroo this would serve as a counterbalance when taking long hops, but would get in the way if the bird wanted to walk fast for any distance.
Just some random thoughts, in response to your queries
Is a long straight branch, like a telephone cable, something which birds are likely to encounter in the natural world? Normally they would want to move from one branch to another, most likely several inches away and at a different height. And then hopping is the only practical option.
I don't know why some birds which normally walk choose to hop on some occasions. I think I've seen starlings do it when they charge at other starlings feeding on the ground. Maybe hopping makes it seem taller, and so more intimidating, and so the other starlings are more likely to stand back as it approaches??
I've never watched magpies, but if they hop wouldn't that fit the rule above (for birds that tend to live mainly in trees)?