The origin of primitive beliefs according to the theory of Herbert Spencer