Chickens just love to scratch in the ground ... it's very hard to stop them. They feed on slaters and other crawly crusty things.
They need a lot of calcium for egg production, and generally they get this from gritty things. They also need gritty things, little stones and shell bits etc, for their gizzard.
To stop them you can put chicken netting on the ground, firmly pegged down or held down with bricks. But their diet still needs to cater for what they need to lay eggs.