Cats usually scratch to get rid of a built-up protective sheath, which is essentially a husk of dead material that dulls the blade of a claw.
Cat’s paws contain scent glands, which release pheromones when they scratch. Your cat could be scratching the wall to mark that territory, in case an intruder stops by.
Changing homes, new pets, new scents, loud noises, and separation can all negatively affect a cat’s mental health.
Cat’s scratching on the wall can indicate that your cat is engaging in conflict with other cats, even if you don’t notice it.
If your cat is feeling happy and comfortable in your home, it may want to play around, which can often lead to scratching.
If your cat is scratching the wall after pooping, it could be looking for a place to hide its excrement.
It might be a habit, or your cat getting rid of excess energy. Since scratching is a comfortable and playful activity, your cat might just go and dig into a wall!
Your cat may not feel comfortable while littering in the litterbox and will scratch the nearby wall as a result.
If they see another cat in the same room as them (in the mirror), they'll want to check it out. Which often results in scratching walls, mirrors, floors, etc.
If the wall scratching is accompanied by meowing, it is likely your cat is trying to flush out the intruders, while also alarming you of their presence.