A gentleman that I have great respect for showed me that when you bend a turkey's leg, the toes involuntarily curl. He explained that this is what helps keep a bird on the roost when he sits down. I believe he explained that the length of the tendons in the legs were just long enough to cause the toes to curl when the leg bent.
If I am incorrect in this, please let me know.