Why do people put silver foil on sweets in the Middle and Far East?

I have an Indian friend who brought some sweets into the office and they are sprinkled with silver foil. Why would someone put silver foil on a sweet? It's like eating aluminum foil or something.
Update: The sweets in question are cake-like so it wouldn't be to prevent melting. I do have a theory that silver foil was originally used for its anti-bacterial properties. Perhaps it was used to prevent bacterial growth, thus preserving the sweets in question? It's a theory...
8 answers 8