It probably goes back into pre-historical traditions, through the classical period of sacrificing a person as a guardian spirit. When ritual sacrifice got a bad press animals were used, which devolved into personal effects, hair and nail trimmings, etc.
We have a green man next to our front door keeping a benign but watchful eye and a Lincoln imp in the living room plus a jewel encrusted crucifix - I don't believe in taking chances.