Carpet that is light in color can cause this dirty lining to show around the baseboards and under doorways. The dirt is a type of “filtration soiling” which occurs as a result of air escaping the carpet. Oxygen can only release where there are gaps which is primarily along the baseboards and under doorways.
Soil deposits get stuck and build up to create a dark film. This process happens for a while before it is visibly noticeable. Once the soiling is seen by the naked eye it means there is a considerable amount of contaminants present. The filtration soiling is an indicator that the carpets are far too dirty and need a thorough cleaning.