This behavior is natural in dogs.
They cover up their "waste" so that an enemy does not find them, from the scent of the poop or pee.
It is an instinct handed down from wolves, who hid their scent by covering up their feces in leaves, sticks, soil, or other nearby natural materials.