Cats use their hind claws to scratch themselves, but those long hind claws serve a defensive purpose as well. A cat under serious attack by another animal will roll onto its back and use its large thigh muscles and its hind claws, aiming at the attacker’s belly.
The aim is, of course, to literally go for the guts, perhaps even to disembowel the enemy. (Owners, if they behave themselves, are never on the receiving end of this.)