According to PetMD, dogs often rub up against things to relieve itching caused by skin conditions, such as canine acne, mange and fungal infections. Parasitic infections, stress and allergies can also cause excessive rubbing in dogs.
Consult with a veterinarian if your dogs are constantly scratching or expressing signs of distress to ensure prompt diagnosis and treatment. When dogs rub up against or roll around in feces, animal carcasses or garbage, this is considered a natural, instinctive behavior that helps dogs to mask their scent while hunting. Dogs express affection and territorial possession by leaning on or rubbing up against their owners or other human beings.