> That's the whole function of shoes though.

Nah, the main function of shoes is (to support your feet and) prevent injury. Cleanliness is second on the list.

[ed.: added braces]

Your feet do not need support, they were evolved over millions of years to support themselves. Someone who habitually wears shoes indoors might lose the muscle strength in their feet in the same way someone who drives everywhere loses leg strength, but this isn't natural or optimal.

Sorry, I phrased that poorly. The muscular support is its own thing (and I agree with you) but your soles don't deal well with hot summer asphalt surfaces, glass shards or even small pebbles surfaces.

I agree, but those bits of glass shards and pebbles end up wedged in shoes and released indoors. Shoes outdoors are important, but the exact stuff they are protecting you against is the stuff you don't want in your carpets.

Agreed. But you have to go shoeless throughout your youth so that the bones and muscles of the foot grow strong. This is true, for example, with kids in some African countries. There was a trend of barefoot running in the US in the 2010's (see Barefoot Sensei), but most people who tried this ended up quitting it as it's hard to shift to this style in, say, your 40's, after a lifetime of wearing shoes.

> But you have to go shoeless throughout your youth so that the bones and muscles of the foot grow strong.

Well, more directly, if you want to be going around barefoot outside, you have to go barefoot for a while in order to harden the skin on the bottom of your feet. It will happen naturally, given enough time, but walking around outdoors with soft feet will hurt like crazy. Bones and muscles are secondary.

In an American context, the primary reason to wear shoes is to prevent parasites on the ground from infecting you through your feet. Shoes are the single most important public health measure in American history, beating out handwashing.

https://en.wikipedia.org/wiki/Necator_americanus

We didn't evolve to walk on concrete and asphalt, though.

Our feet were not evolved to walk over stone and concrete all day.

> they were evolved over millions of years to support themselves.

But not on hard floor.

People in shoes off houses tend to have slippers or house shoes, which never go outside. They also tend to have bathroom slippers, which are only ever used in the toilet areas.