By instinct, animals have a specific smell. Dogs have to wallow in things that smell EVIL. For them this is normal, because it helps them to “camouflage” in their surroundings. As humans we are, we tend to want our pets to smell like roses and jasmine, or fresh breeze or things like that, but for animals these smells are not pleasant as they are for us. Dogs have to be guided by their smell and this has been their survival tool for centuries. Your dog can wallow in his feces because he likes the smell.
1- If your dog smells of something other than "natural" for him, maybe this may be the cause of your dog to roll in his feces, because the smell likes and helps him "camouflage." If this is, then avoid using perfumes or flavorings in your dog.
2- You can do it for lack of correction: You must pick up what your dog does as soon as he does if it is in a park or on the street, but if it is in the apartment or house (floor that can be cleaned), I recommend clean the area in which he made alcohol or vinegar to avoid the smell.
3- Talk to the veterinarian, the food you give your dog may have a compound that makes the smell attractive to the dog.
The smell of shampoo displeases you
Today we find shampoo with a smell of fruits, lavender, mint, ... These are aromas that are very pleasant, but that the dog may not like anything. And it is that this animal has a sense of smell much more developed than ours, so that if you have a chance or if you do not get used to it, you will go to embark with the first thing you find.
You have found something interesting
The dog can wallow in something to tell the other dogs that he has found the interesting one. It is a genetic trait and, unfortunately, with this we can do little, except to take a good shower and try to avoid taking it to places where you may need to lie down and wallow in things you should not.
I hope you can now know better why your friend has this strange behavior.