Dogs roll in smelly things as a way to mask their own scent with the strong odor, which helps them camouflage themselves while hunting or avoiding predators. It is also believed that rolling in strong scents could be a way for dogs to communicate their presence to other dogs in the area.