Probably originally caused by someone putting wax, soap, lard, nose oil, etc. in the joint.
If you put wax in the joint, you have almost no way of ensuring there aren't globs somewhere in the threads. Wax will hold dirt and grime if it is too thick. If you want to wax a joint, lightly wax...