Water displays surface tension because the molecules of the water would rather interact with other molecules of water than with the molecules of whatever is outside the water - in this case, the metal of the pin. However, if your pin has been washed and has some soap remaining on it, or possibly salts from contact with perspiration or corrosion, then this isn't necessarily the case. Adding a layer of oil to the outside of the pin ensures that the surface of the pin will not have any favorable interactions with the water.