My 5 yo cat has always done this and it drives me crackers. I've lost so many chargers to her and obviously it's a fire hazard as well, we can't leave anything switched on. She also chomps on anything plastic - my phone, for instance, and the edge of my laptop. I've taken her to the vets in case she has gum disease or similar - nope.
Anyone else's cat do this? I think she thinks she's a bloody dog!
My DBro had to send a cat back to the breeder because it had Pica (chewing unsuitable things), in this cat's case electrical cables. DBro has a LOT of electrical kit in his house, and this 2yo he'd taken as a rehome cost him hundreds just in cables in the first week. Interestingly, the cat he was a replacement for who had died shortly before also had Pica, in her case plastic bags, though nowhere near as bad and nothing to do with her demise!