Why do dogs walk in circles for naps?

Before they were domesticated, dogs would walk in circles to create a bed to sleep in and have it stay that way. Dogs still do today despite having dog beds.