The most consistent religious role dogs have anywhere is as escort and guardian at the boundary between the living and the dead, and the consistency is striking enough to be worth listing.
Egypt. Anubis, jackal- or dog-headed, presides over embalming and conducts the weighing of the heart against the feather of Maat. The animal behind the depiction is probably the African golden wolf, formerly identified as a jackal, and its habit of frequenting cemetery ground is the likely origin of the association.
Greece. Cerberus guards the gate of Hades, ensuring that the dead do not leave. Hecate, goddess of crossroads and of the threshold, is attended by dogs and receives them in sacrifice.
Zoroastrianism. The dog occupies an exceptionally high status. The rite of sagdid, the dog's gaze, requires that a dog look upon a corpse, an act understood to drive off the corpse demon and to confirm death. The Vendidad devotes substantial passages to the treatment of dogs and prescribes penalties for harming them. Dogs also guard the Chinvat bridge that the soul must cross.
Mesoamerica. Xolotl, dog-headed, accompanies the sun through the underworld each night, and the hairless xoloitzcuintli was buried with the dead to guide them across a river in the underworld journey. Dog remains are recovered from burials across the region.
India. The dog Sarama and the four-eyed dogs of Yama guard the path of the dead in the Rig Veda. In the Mahabharata's closing episode, Yudhishthira refuses to enter heaven without the dog that has followed him, and the dog proves to be Dharma.
Why dogs so consistently occupy this position is not mysterious: they scavenge, they guard, they are the animal most likely to be found at the edge of settlement, and they are the one animal that chose to live with us.