Dogs will often roll in smelly, disgusting things if given half a chance. The explanation I have heard is that it's instinctive behavior to cover their own scent so predators or prey cannot smell them!