Lizards lose their tails to throw off predators.
Even after a tail detaches, nervous spasms make a newly dropped lizard tail wag around as if it's alive. The headless appendage startles predators and gives tailless lizards a few precious moments to escape, relatively unharmed.
The trauma jumpstarts cells to build a new tail out of cartilage. Original tails are made of bony vertebrae.
Regeneration can use up a lot of energy, and as lizards get older their tails actually become less colorful, and therefore less attractive to predators.