Rogation Day was introduced in the 8th century and was a Christian adaptation of the Roman robigalia, a procession through the cornfields to pray for their preservation. The bounds were beaten to symbolically drive out the devil, presumably into the neighbouring parish.
It was marked into medieval times and then suppressed for its pagan connotations, but the beating of the bounds ceremony survived into the 19th century. This was a more prosaic adaptation to ensure no boundary stones had been moved or unauthorised buildings erected. The bounds were still beaten, as were boys at strategic points, apparently to ensure they would remember their parish boundaries in years to come.