In Scandinavia it was an old pagan tradition to bury an animal alive under a house. The belief was that it would then haunt the house and keep it clean of other spirits.
While there has never been found any written records or animal bones under a church, people non the less thought the church had picked up the tradition, and they thought these Christian "spirit animals" was more powerful than any.
The tomb sow was a big black sow who was believed to protect the graveyard from intruders. She chased off playing children or simply people walking through it at night. If people saw her coming at them they'd better run, because if she caught up with them she would run between their legs and cut them open from the bottom up using the stiff hairs on her back.
When she was not busy scaring and killing people, she chased the spirits of evil people who didn't deserve to be buried in holy ground out of the graveyard, or showed the priest where to bury the next grave.
The church lamb on the other hand protected the church against nature spirits like trolls and elves. It also walked around the graveyard looking for a good place for a grave, then went out to collect a person to put in it. The sight of a church lamb was a sure sign of one's own death.