When dogs lived in nature, they had to bend grasses to make a mattress for the night. Walking in circles around the sleeping area also drove away noxious animals such as scorpions, spiders, and snakes. Modern dogs no longer have to make their own beds, but the behavior has become imprinted on the brains of even today's dogs.