I have observed these, I have seen dogs, goats, cats, wolves, etc scraping the ground. In some cases they sat onto it. In some cases they didn't. Following are cases where it makes sense:
- Sharpening their hooves - Thats one way they sharpen their hooves periodically. I have seen our dog and cat scraping the ground, possibly with an intention to make the nails blunt (If we don't cut them first!).
- Marking - I am not sure about goats, but many mammals use this to mark their presence.
- A little scraping of ground allows the animal to sleep/sit on the surface which is comparatively softer, warmer or cooler (depends on season/geography)
- A very common but rarely noticed scenario: Talking to villager who had 100s of goats, I asked him why a goat is seen stamping the ground or scraping the ground. Stamping had multiple meanings. He told me that sometimes something gets stuck in their hooves, and scraping a surface helps them get rid of it.