Image of Castell y Gaer (Llangelynin) (Hillfort) by postman

Ive forgotten how many hillforts have a stone like this in their ditch, but ive seen a few, does they have a function or was it just in the way.

Image credit: Chris Bickerton