they were offered to the deities at temples and in home sanctuaries and were placed in graves to scare away evil spirits , pay tribute to a particular god or maybe just to keep the deceased company on his or her trip into the afterlife .