Here's a breakdown of why this evolved:
* Protection: The quills act as a shield, preventing animals from getting close enough to bite or attack.
* Deterrence: The sight of the quills and the potential for painful injury is enough to scare off most predators.
* Defense Mechanism: When threatened, porcupines raise their quills, making themselves appear larger and more intimidating. They can also shake their bodies to dislodge the quills, which can embed themselves in the attacker's skin or fur.
Interesting fact: Porcupine quills are made of keratin, the same protein that makes up human hair and nails.