Spiders have unusual muscles.
To be honest, the way a spider's muscles work is quite fascinating. Their muscles can only pull their legs inward, not extend them out. Spiders will pump a watery liquid into their legs to help push them out again to avoid this problem. Because there is no fluid being distributed to retract the legs of a dead spider, they are always curled inwards.