The Greek verb daiein, which meant “to divide,” had the special sense “to distribute destinies.”
Thus daimon, which is probably connected with it, meant “a divine power.”
It was nearly always used in a good sense; Socrates, for instance, spoke of his daimon, meaning very much what we should call “guardian angel.”
But when the worshipers of the old gods became Christians, they could not grasp the idea that their former deities had never existed; yet at the same time they were taught that they must cease to worship them.
So they tended to compromise, regarding the daimones as real enough, but spirits of evil.
Hence the deterioration of the meaning of demon.