If anyone wants to know, the reason that happens is because spiders move their legs with a hydraulic system and once they are dead the pressure gets released and they revert to their "default" state.
https://asknature.org/strategy/leg-uses-hydraulics-and-muscle-flex/