I have one cat which seems to obsessively dig at mirrors or glass. We have floor length mirrors on our closet, sliding glass doors to the backyard, a bedside table with glass, the bathtub doors, and the bathroom mirror.
She usually only does it when we're in the room and will dig at it like she's going to go somewhere if she tries hard enough.
We've tried double-sided tape, which does stop her from digging at the area it's applied, but she'll just go find another area to scratch at, and it's impractical to apply this tape to all glass/mirror surfaces in our house.
We've tried discouraging her using a spray bottle, which usually works for other bad behaviors from her. However, she'll only stop briefly, wait a minute, then start again. Frequently she acts almost as if she's being forced to dig as fast as she can before she gets sprayed again.
She knows it's "bad" behavior since if we look at her, she'll usually stop until we take our attention off her again. Or being the cat she is, sometimes she'll stare back at us, and deliberately do one slow scratch to see our reaction (that one is usually when she wants us to wake up or be petted).
She has plenty of items to scratch on around the house which she does use, so I don't understand why she feels the need to dig so desperately at glass surfaces.
Why does she do this?
It should probably be noted that she is our "stupidest" cat, frequently doing illogical things like allowing herself to fall off our laps or other surfaces, trying (and sometimes failing) to climb up objects or across small gaps where any other cat would normally jump, and not reacting as quickly or intelligently to various situations as our other cats do.