Most dogs scoot when their anal glands are full. Dogs have glands on each side of the rectum that contain a really stanky material similar to a skunk. Most dogs will empty their anal glands on their own whenever they have a bowel movement. However, for some reaons (i.e. soft stools, etc.) some dogs are just unable to do so. When these glands are full, not only are they very uncomfotable for the dog, but they are painful as well. In addition to that, if they are unable to empty on their own, then they can abcess which is obviously very nasty & VERY painful to the dog. Plus, if left untreated, they can cause serious infections.
Has the vet checked the anal glands at all? (& I don't mean just a "squeeze" test, but a "finger probe" test) Once the material is old & left in the glands, it can become very hard & crumbly (vs. the liquid it normally is), & can be very hard to get out....usually the dog must be sedated in order to flush the glands free of the debris.