Coins, and sometimes small stones, are often left to let friends and family members know that the deceased was visited by someone who cared.
Other reasons also include:
1. so that the deceased can pay the ferryman to cross the River Styx.
2. as a "down payment" to buy the fallen friend/family/comrade a beer in heaven, or where ever they ended up.
3. and I'm sure there are other reasons