Of all the arcane and mysterious habits of dogs, licking glass windows is among the most puzzling. A pane of glass does not have much of a taste—unless dogs happen to like a hint of glass cleaner on their tongue—and there seems to be no apparent benefit to the dog. Yet dogs can often be found licking sliding glass doors and car windows, among other targets. So why do dogs do it?

Speaking with The Dodo in 2016, Kenny Lamberti, then the director of strategic engagement for the companion animal department for the Humane Society, said that licking is a normal behavior for dogs. “They can lick to soothe themselves, self-groom, or sometimes to relieve stress,” he said.

Licking is thought to be a “displacement” behavior, where a dog engages in a practice to cope with feelings of anxiety or boredom. Other examples of displacement behavior include circling or excessive chewing. Once a dog begins to engage in this kind of behavior, it may become compulsive—that is, the dog will return to the window again and again.

When it comes to car windows, the answer is typically some form of transient anxiety. Because dogs riding in cars may experience some measure of uncertainty in their constantly changing surroundings, window-licking may help alleviate it.

If your dog is a chronic glass sampler, you may want to increase their activity level to help offset any boredom they may be feeling. Giving them a rotation of toys could also help keep them engaged.

Rarely, habitual behavior like window-licking could point to a neurological issue. If it persists, it’s best to visit a veterinarian.

[h/t The Dodo]