Answer: "So this is called caudal autotomy, it differs among species but the basic idea is that a lizard’s tail will be grabbed by a predator and the tail will rip off allowing the lizard to escape." @davemcdave8888
"Depending on the species, the detached tails of some lizards may continue to wiggle, distracting the predator. Some species of lizards are able to partially regenerate their lost tails over several weeks or months."
the person who found out that the cheese still tastes good only took a bite of mouldy cheese sandwich ...