In marking their territories, cats use three methods, one related to sight, the others related to smell. To provide visual evidence of “This is mine!” cats scratch. (And you thought they were just sharpening their claws.)
To provide olfactory evidence, they rub objects with their muzzles, leaving glandular secretions that humans can’t smell but that are picked up by other cats. And even more noticeable olfactory evidence results from spraying urine—unneutered toms are the worst (and most malodorous) perpetrators.