Why does sand stick to my shoes? Well, that's easy: the sand is wet, and my shoes are wet, and hydrogen bonding adheres the wet sand to my wet feet and to my shoes.
But then I walk home, and my shoes dry, and the sand on them dries, and some of the sand falls off.  But some does not.  It's really stuck: even several days later I can turn the shoe upside-down and it won't fall off.  What holds it on?
Sand sticks to my feet after my feet dries and the sand dries.  Is this the same?
 A: After reading this article, which states that Olympic beach volleyball sand is specially engineered to not stick to people, I have to assume it is a property of the sand itself and not the shoes or the person (for the most part). 
Generally speaking, wet sand will stick to dry objects and dry sand will stick to wet objects. But not (as easily) wet sand to wet objects. The small amounts of water act as a sort of glue, allowing for capillary forces to hold the objects together. Sand most likely interacts nicely with water in this respect. 
As to why the sand stays after the water is gone, @Nathaniel is dead on. The water is not pure and when it evaporates it leaves behind a crystalline structure that acts as a bridge between the dry surfaces and holds them together. 
A: I think this is because your shoes have tracks over the non-uniform surface to provide frictional force for movement,these holes allow the wet sands take longer time to evaporate, the outermost layer should get evaporate first, and fall off once the water is evaporated.If your shoe surface is facing directly downward, It would probably take a very long time for all the sand to fall off before you use the shoes again.
NB , the inner layer would take longer time to evaporate .
As the amount of sand slowly falls off, the reason why there are still some of them adhered to the shoes is because the tracks under the shoes are non-uniform and provide a normal reaction in a microscopic level, balancing the pull of gravity.
The reason why they remained stuck there is because the weight of these inner layers of sands are less "heavier" as there are no sands sitting above it, and the normal force provided by the tracks is enough to balance the gravity of each grain of sand By F = dm * g  allowing them to stuck there ; dm is infinitesimally small mass. 
