Have you ever noticed that your dog might twirl around a few times before settling down? No, he’s not checking to make sure the rest of his body is still attached; what he’s doing can actually be explained by evolution.
Before domestication and when dogs still lived in the wild, turning around before sitting served the main purpose of flattening tall grass. Flattening the grass gave them a more comfortable place to sit and also exposed a layer of cooler dirt to help the dog regulate its temperature. It also gave them a chance to check for small predators, such as snakes and poisonous lizards.