Nowadays, it is generally recognized that it is because being barefoot allows the dancer to maintain the most intimate connection with Mother Earth and the music, to return to nature, and to draw from the earth the energy for unlimited reproduction of the life force.
If the floor is soft and the weather is warm, dancing barefoot can make the body feel more liberated and free. In short, barefoot or not, what is right for you is right.