This is usually a way of spreading their own scent around the house or of marking their territory. When a dog rubs herself all over the carpet, she leaves her own scent behind, which will help her feel more comfortable and at home in her environment.