Let's take the simple case of 2 shoes and 2 socks first. There are $4!$ possible orderings (or permutations) of these 4 objects. However, I want to point your attention to the following permutations in particular:
$$P_1 \rightarrow (Shoe\ 1, Sock\ 1, Shoe\ 2, Sock\ 2)$$
$$P_2 \rightarrow (Sock\ 1, Shoe\ 1, Shoe\ 2, Sock\ 2)$$
$$P_3 \rightarrow (Shoe\ 1, Sock\ 1, Sock\ 2, Shoe\ 2)$$
$$P_4 \rightarrow (Sock\ 1, Shoe\ 1, Sock\ 2, Shoe\ 2)$$
Notice how only $P_4$ is a valid permutation since the shoes for leg 1 and leg 2 are worn only after the socks have been worn.
Also see that all of $P_1, P_2, P_3$ and $P_4$ represent the same leg order $(leg\ 1, leg\ 1, leg\ 2, leg\ 2)$. We can deduce at this point that corresponding to any given leg order there is exactly one valid permutation. So the question really boils down to finding how many distinct possible leg orders there are.
There are two ways to think about this. The easier one is to realize the number of distinct leg orders can be given by: $$\frac{4!}{(2!)(2!)} = \frac{4!}{2^2}$$
This is because we are counting the number of permutations where two groups of objects (each of size two) exist such that their contents can not be distinguished from one another.
In our case of 8 shoes and 8 socks, eight groups of size two exist such that their contents can not be distinguished from one another. So the answer we are looking for is: $$\frac{16!}{2^8}$$
Alternately,
Start by thinking that for any fixed leg order there are the following possibilities:
$$ case\ 1 : You\ get\ no\ sock-shoe\ pair\ wrong\ \rightarrow\ {2 \choose 0} $$
$$ case\ 2 : You\ get\ one\ sock-shoe\ pair\ wrong\ \rightarrow\ {2 \choose 1} $$
$$ case\ 3 : You\ get\ both\ sock-shoe\ pair\ wrong\ \rightarrow\ {2 \choose 2} $$
Hence, any fixed leg order appears exactly ${2 \choose 0} + {2 \choose 1} + {2 \choose 2}$ times when we consider all $4!$ possible orderings. So number of distinct possible leg orders must be: $$\frac{4!}{{2 \choose 0} + {2 \choose 1} + {2 \choose 2}}$$
Extending the same logic to the case of 8 shoes and 8 socks, we get: $$\frac{16!}{{8 \choose 0} + {8 \choose 1} + \cdots +{8 \choose 8}} = \frac{16!}{256} = \frac{16!}{2^8}$$