This is called “zoochosis” a type of psychosis for animals that are stuck in captivity. This dog is being neglected and sadly, this is a coping mechanism.