Actually this logic is totally flawed and I see it first hand at home in Chiang Mai.
We have 4 steps and a balcony. The Thai tradition (which I do not understand) is to leave footwear at the foot of the stairs and walk inside the house. The concrete at the foot of the stairs is dirty and can have mud when it is wet, and it definitely has a lot of sand that is picked up from the dirt as we do not have grass or a pathway yet. The stairs and the balcony are very dusty as can be seen by wife's and daughters feet at the end of a day.
I on the other hand wear my footwear up to the door then take footwear near the door mat.
P.S. It was really funny to see 40+ pairs of footwear at our housewarming. One of the ladies that was following the blessing on the balcony noticed that she ended up with 2 different sandals when she left as the footwear was everywhere.
View attachment 373913
I much prefer the western tradition of wearing footwear inside the house and then taking the footwear off.