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.
This is a terribly contrived demo and not really realistic, but it illustrates my point. It's a bathroom-cleaning robot and it's kinda what I described. R2D2 with arms coming out of it's head. It's roughly human-scaled, but not at all humanoid.
https://www.reddit.com/r/robotics/comments/1q9y5wh/toilet_cl...
Of course, optimal robots will be useful, like ultimate roombas for cleaning floors or something like that, they will work better than humanoid robots for sure.