Dogs then lick the feet and bite their nails because of the itching.
The moisture and infection in the saliva then encourages a secondary bacterial or fungal infection on the feet.
This can become a nail bed infection as well (which can be a treatment challenge).
It is a vicious cycle that your dog needs help to break.