What is the purpose of greasing BB threads? As is known for Shimano sealed bottom bracket cartages (e.g. page 16 here), if the BB cup is made out of metal, grease should be applied to the frame-cup thread. If the cup is plastic, grease should not be applied.

My question is what is the purpose of applying grease?

On a side note, I have heard of a couple of explanations, none of which I can prove or disprove. Firstly, to prevent difficult removal of the cups due to corrosion of cold welding. And secondly, to prevent intrusion of water and contaminants through the threads.
To prevent galvanic corrosion. When grease is appied, there is a thin film of grease that prevent direct contact between two different metal. 
To prevent water and contaminants, especially salt in the winter season, that would otherwise accelerates corrosion as discussed in (1)
This will not work with plastic or carbon fiber (+epoxy as matrix) materials as grease will reduce the material's strength over time, i.e. epoxy on carbon fibre is weakened.