It’s probably a question you’ve never wondered when quickly dispatching of a pesky eight-legged intruder with a nearby household object.
A spider's eight legs have flexor muscles to retract their legs and bring them inwards. But some of their legs lack muscles to extend and stretch back out again. Instead of these muscles, spiders use the blood pressure spike from their heartbeat to extend their legs out, as the graphic below from Jacob O’Neal for BBC Earth explains. And with no heartbeat when the spiders cease to exist, they curl up upon death.
You can find out more about the tarantula on Jacob O'Neal's Animagraffs.