Earlier quoted context omitted.
Saying that "legs evolved for walking" is a completely legitimate statement. Something can be said to have evolved for a purpose -- as a short-hand for saying that random changes that helped that purpose increased fitness and were selected for by natural selection.
If legs evolved for walking why are they so useful for swimming? There is a set of genes that encodes for the behavior of walking or allows us to learn it and a whole other host of adaptations from our vestibular system to the angle at which our neck connects to our skull that taken together as a whole are adaptations for walking. Each on its own has many, many other uses that have nothing to do with walking and prov…
The fact other parts of the body also evolved to facilitate these features is not a contradiction.
Evolution is like a parallel computation looking for a local optimum. When climbing the hills of the possibility landscape, various features that exist at the top of these hills can be described as the purpose of a particular search path.