It's creating a gastrolith [1]. This is a very common behavior among ground birds, which against logic, swallow stones to help in digestion. The digestion process is a bit different for birds, because they do not have teeth. read more
Birds who mostly feed on grains and plants take in stones and pebbles in their diet so as to help them digest their food. These pebbles help in grinding down the hard grains and the cellulose in the plants. read more
Birds do not have teeth, so they swallow stones to fill their gizzard where the stones are used to "chew" their food. read more