An excerpt from The Firefly Forest:
The bold orange or red and black colors of an Arizona Giant Centipede are a form of aposematic (warning) coloration meant to scare away potential predators. Along with their venom and universal warning colors, Arizona Giant Centipedes have another defense against predation, a posterior pseudohead similar in color and appearance to their actual head. The pseudohead even has what appears to be orange antennae like the real head, but these posterior "antennae" are actually modified legs. Arizona Giant Centipedes can move quickly either forward or backward, and if a predator mistakenly grabs the more expendable headlike tail, the centipede can rapidly bend around and attack it with its venomous front legs. In the above photo, the centipede's true head is the one higher up on the wall.