Just want to pedantically point out that we're not at our evolutionary endpoint yet. Humans are still evolving!
We build just about everything we expect to interact with against the constraints of the human form, not just living spaces. And yes we because we built those spaces for the human body, the human body is by definition the optimal choice.
>There's no reason a robot traveling over smooth surface should have legs instead of wheels or treads.
There's a reason. The robot becomes useless for any surface that isn't smooth. What's it going to do about stairs ? You're not going to make a bespoke solution that generalizes for us better than 'feet that work'. Do you think it's better to built a million different complex robot bodies for every situation ? That defeats the purpose of being general purpose.
The planing ahead thing through simulation for example seems to be a very good tool in neuronal network based architectures.