For Mesoamerican cultures Xoloitzcuintli dogs were very important.
There is archeological evidence that people from Teotihuacan were buried with dogs and that in some Mayan rituals they were sacrificed.
In the Aztec mythology the dead had to travel from the earth to Mictlan (the world of the dead). The travesy lasted four years and went through nine dimensions.
The first dimension was called Apanohuaia, in there the dead had to cross a large river with the help of a Xoloitzcuintli. If the dead had been mean to a dog they had to stay in that dimension eternally.
This Pre-Hispanic inheritance is probably the origin of the belief, in many communities around the country that the dead need to cross a river to leave from the living world.
The only way to cross that river and access the world of the dead is to be helped by a dog.
Same as with the Aztecs if the dead had mistreated any dog, they won't be able to cross the river.