Because its trying to sharpen its teeth what my mom and I did was put lemon juice on the cage she never bits on the cage now!!!
He/she is trying to wear down his/her teeth. Give your guinea pig an untreated slab of wood, preferably for an apple tree. Never from a tree that produces anything with a pit.
Mine does that too lol 😂 he usually does it when he can hear a bag or smell some veggies, he squeaks then starts eating his cage, so it might just be because he/she wants a treat
He bites the cage bars for something 2 chew on put timothy hay in their cage and also put old toilet paper rolls in (make sure to pick off extra toilet paper) or you cud buy salt licks or stuff 4 them 2 chew on and then he should stop biting the cage.
Because he is trying to escape!!!
It's testing the bars on the cage, and he is sharpening his teeth.