I'm sure there are dog owners out there who are more than familiar with this behaviour from their pooches and know the reason why but I am just going to explain for the lay person.
The reason they do this is because they are predatory animals and the kind of instincts that have been hardwired into their programming for millions of years of natural selection (and not quite been shunted out by human selection) are still present within the species today.
And what purpose does this instinct serve?
Why, to mask their scent, of course.
To make sure that when they are stalking their prey they do not give off great honking pheromones that broadcast "Dangerous Predator" to their unwary victims who have, likewise, been naturally selected to be hyper-alert to anything that even resembles a predator.
So what better way to do so than to cover themselves in the musk and scent of an unassuming prey species? The kind found lying around in excrement. It's the same reason cats bury theirs: to reduce scent markers that might identify to the prey that there is a hungry monster in this territory.
It's olfactory camouflage. Appearing to be harmless until the moment when they bear their fangs.
Now the interesting thing about this is humans kinda do it too... to each other... because, as apex predators competing among ourselves rather than with the big cats and wolves that we once did: Human-kind's biggest predator is itself.
Only, because our means of communicating intent is through audio-visual and emotive means rather than through scent, the things that human predators do to hide their nature is by mimicking the mannerisms, interests and viewpoints of those whom they wish to predate.
Now we all somewhat do this within our social groups: copy people, keep up with popular trends and memes and even mimic each other's posture and language. It is a way of fostering bonds. We all want to be in with the group to some extent because doing so gives a feeling of security and validation.
So, that being the case, I wonder what the traits are that differentiate the predator from the rest of the herd?
As a predator, what would be the easiest way to make you seem like the least dangerous thing there?
The answer is you fabricate an aura of vulnerability. You pretend to be prey. And you rely on the group around you to instinctively protect the most vulnerable members of the herd from other predators... Not only those from the outside but the ones within... the undesirables... or, at least, the ones undesirable to the predator.
The ones who don't believe the threat narrative the predator is weaving like a protective cocoon. The ones who are weird or annoying or think the 'wrong' things.
It's like a cuckoo in a nest convincing the unwitting parent bird that they are its real child while kicking out the actual children.
And the scariest and most... problematic aspect of this is that it can be damn difficult to tell if someone is actually being victimised or if they are victimising themselves in order to manipulate the group.
Because humans are empathic creatures we want to help our own. Sometimes for purely selfish reasons, sometimes out of a sense of altruism and sometimes because we hold ourselves to a particular sense of fair play or other kind of rule-system.
The only way you can determine anything in this world, of course. You question. You use your reason and logic to notice patterns and in what ways those patterns don't mesh.
If you find yourself in a group that, for some reason or another, has started ganging up on certain people and divvying up into cliques, pay attention to the reasons given and whether they actually ring true with the facts.
DON'T TURN INTO A BULLYING SCUMBAG JUST BECAUSE YOU FEEL YOU'VE BEEN GIVEN A FREE REIGN TO BE ONE!
But, yes, in short, the most dangerous wolves can be the ones in sheeps' clothing. So make sure you keep your brain razor sharp in case they start bleating and pointing fingers with claws attached.