MBL Director Nipam Patel and Research Associate Heather Bruce are quoted in this story.

There seems to be no ideal number of legs. Humans have two, dogs have four, insects have six and millipedes can have over 1,000. So what made spiders settle for eight legs?

"I think the best answer and the simplest answer is that spiders have eight legs because their parents did," Thomas Hegna, an assistant professor of invertebrate paleontology at the State University of New York at Fredonia, told Live Science. "But then that gets into sort of a regress, and somewhere this all had to start."

If we follow the succession of eight-legged spider parents back to about 500 million years ago, during the middle Cambrian Period, we arrive at the root of the chelicerate lineage, the group of arthropods that contains spiders. If we go even further back, to 541 million years ago, we find the ocean-dwelling lobopods, the ancestors of all arthropods. Read rest of the story here.

Source: Why Do Spiders Have 8 Legs? | Live Science