At one time carpets often became dirty fairly quickly after they had been cleaned.This was due that the cleaning process often involved the use of very harsh cleaning chemicals with a high alkaline content that was often left in the carpet and not rinsed out properly.
Nowadays most carpet cleaners use much better cleaning agents and it is known in the industry that to prevent resoiling carpets must have a thorough rinse and left in a slightly acid state.