They have surprisingly sensitive skin, the dog may be trying to scratch an itch. My maltese was overcome with itchiness when I fed him Beneful dog food, he was miserable. He also cannot tolerate the flea medication you apply to the skin, we have to go with the oral kind.
Try changing his/her diet, avoid food with coloring additives, and use a gentle dog shampoo.