How do I prevent a tube valve from fusing to my rim I have a 20" Sun Rims CR-18 rear rim. This rim has a cylindrical metal sleeve that goes through the valve hole. Not sure where that came from, as I inherited the rim with the bike when I bought it used. 

When I was changing the tires after riding this bike through the New England winter, I noticed that the valve on my tube was stuck to this sleeve in the rim. I used locking pliers to attempt to wiggle the valve free, but instead, it sheared off the end of the valve and left the rest of the valve fused inside the rim. 



I had to drill the remainder of the valve out. When it eventually dislodged, it released some gray powder. 



What caused these two parts to fuse together like this, and how can I prevent it in the future?
Sounds like galvanic corrosion. If you're somewhere that salts their winter roads, this is why people ride beater bikes.

A fix might be to smear the valve stem and around the valve hole with a thin layer of RTV silicon or possibly a grease to stop the two surfaces coming in direct contact.

Combining brass and aluminium is generally considered incompatible 

You might prefer to choose tubes that have rubber up the sides of the valve stem (not uncommon on Schrader but rare on presta) or some tubes use stainless steel valve stems.

To be honest, I'm surprised there aren't more corrosion problems between alloy rims and brass valves.