Dogs bury bones and other items because of ancestral instinct. 
The ancestors of domestic dogs would hunt in packs. If the hunt was successful, they would usually have leftover food. To keep that food longer and keep it safe from other animals, they buried it in the ground.  If their hunt was unsuccessful, they would bury what they had to keep other animals from smelling it and taking it.
No matter how successful the hunt was, the pack would later return to where the food was buried when they were hungry. The spots in the ground where they buried the food were considered their safe spaces. This instinct is why domestic dogs bury bones and other items in certain spots, or "safe spaces," whether in the ground or in the home.
The ground also acts like natural refrigeration. Animal carcasses and bones in the ground keep longer because the dirt keeps out sunlight, and it also masks the smell so that other animals cannot find and take them.
The process of burying food in the ground is known as food hoarding.  Dogs are not the only animals that perform this process. Species like squirrels, leopards, and beavers also hoard their food in the ground.