Dogs are often attracted to hard surfaces such as metal, and begin a habit of licking these surfaces. Dogs may be drawn to metal surfaces in particular because of the cool sensation or the taste. This can sometimes develop into a full-blown constant habit that becomes problematic for the owner. In other cases, it is simply a mild inconvenience.
Metal surfaces with traces of lead in them are said to taste similar to strawberries, so dogs may simply enjoy the taste. On the other hand, a dog may pick up a habit of licking metal due to a obsessive-compulsive disorder. Symptoms appear differently than they do for humans but often involve repetitive actions, done to soothe anxiety or alleviate boredom.
If a dog is bored or experiencing a period of stress, he is much more likely to pick up strange habits such as this. Dogs with a background of abuse or trauma are at greater risk of developing obsessive-compulsive disorder. A good way to help ease their anxiety is to distract them in a way that they cannot possibly ignore, such as providing them with bones or pigs' ears to chew on. The repetitious nature of chewing a piece of rawhide can provide them with a sense of calmness and security.