Dogs have a very strong sense of smell, and rolling in smelly things is a natural behavior rooted in their ancestors' wild instincts. Wild canines would roll in strong scents to mask their own smell when hunting or to communicate with other pack members. So, when your dog rolls in something smelly, it could be a way of trying to disguise their own scent or sending a message to other animals.