originally people were buried within a church, then over the centuries as the church crypts filled up, the remains of the earlier burials were removed to the back of the church and burnt (hence we get the word bonfire from the bonefires) and new burials took their place. The nearer to the altar a person was buried the more important their position in the parish. when the population increased then space inside the church was reserved for the elite and the peasants were buries outside the church, not at first 6 feet under but once it was realised that the local swine herd could dig up bodies the grave diggers worked out that burying 6 feet deep prevented pigs digging up the bodies as they could not get down and out of a 6 foot hole, then someone decided it would be an even better idea to build a wall around the church to create a boundary and keep pigs out, thus a churchyard was created. x