One reason is that they are trying to cover themselves in the scent of the dead animal. This can be a way for them to mark their territory or to attract other dogs.
Some parasites, such as ticks and fleas, can be found on dead animals.
If you are concerned about your dog rolling in dead animals, there are a few things you can do to discourage this behavior.
Another thing you can do is to clean up any dead animals that you see in your yard. This will help to prevent your dog from being exposed to the scent of the dead animal and from rolling in it.
You can also try to teach your dog a command that tells them not to roll in dead animals. This command could be something like "leave it" or "no."
If your dog still rolls in dead animals after you have tried these things, you may need to consult with a behaviorist.
Rolling in dead animals is a natural behavior for dogs. However, it can be a problem if you are concerned about your dog's health or if you do not want your dog to roll in dead animals.