This behaviour is often seen in pet dogs and it is a strategy that is very useful to a wild canid. By stashing any excess food away, covering it to hide it from scavengers and being able to remember where it is hidden a wild canid is gaining a very large advantage if it fails to find sufficient food in the following days.
It is a behaviour that appears to be instinctive to a degree. It may also be partly a learned behaviour or have an element of learning about it to "switch on" the instinct - that may be why it is not seen in all dogs. It is also known that dogs show different behaviours in varying degrees - some dogs howl regularly while others never do, for instance.
As for toys - this is a very interesting way to show the difference between a human and canine point of view. A dog that stashes it's toys is treating them as a valuable trophy ( such as a chunk of meat). The human leaving the toys around for the dog to play with at will is in effect raising the dog's status in the pack by allowing access to such valuable and prized posessions. The human sees it as a kind and loving gesture to give the dog as many play things as it wants without realising how important they are in defining relationships for the dog.