Basically it is related to a social fact - the ‘child exploitation’ - of Switzerland which was implemented from the late 18th century to 1960s.
The orphans, the children of poor/divorced families, of convicts or of the ones who owed money to the state were given to the rich families through the state and the church in order to work. However, this child exploitation was turned to a child slavery when those children were sold in bazaars so that they work in farms.
So, Heidi was bare foot as the author wanted to underline the slave children – verdingkinder - who were bare foot that differentiated them from other children.
It seems that every country might have had some dark side even it is Switzerland – the free, peaceful and rich country of today.