This behaviour is an uncommon and local adaptation of many birds’ need for grit to aid digestion – an interesting process which is worth explaining.
Having no teeth and poor saliva glands, birds tend to swallow their food whole, so often pick up and swallow pieces of gravel, sand, shells and other hard substances (often unfortunately including, in the case of game-birds in particular, highly toxic lead pellets).
These hard items are then passed down with digestive juices secreted in the upper part of their stomach (called the proventricus) to the lower part (called the ventricus, or gizzard) which has a rough, sandpaper-like surface.
Here they help pulverise the food and enable it to be transformed into proteins, fats and carbohydrates, with the help of bile from the liver and enzymes from the pancreas. These are then absorbed through the intestinal walls into the bloodstream.
After this digestive process is complete, waste matter is then excreted through the cloaca, or harder materials sometimes by coughing up pellets, though gritty substances can become compacted and build up in the stomach over time and cause problems.
Some birds, like pigeons and jays, have a crop at the side of their proventricus in which they can store food before it is digested, so that they can eat it later when hungry or feed it to their young in the nest.
On the whole it could be said that birds’digestive systems are even more refined than ours!