Pantyhose can completely and tightly wrap around the body and can fully display the body shape and movements, so dance needs such completely tight-fitting costumes. The purpose of pantyhose is to make the legs softer and more beautiful, to emphasize the lines of the legs and to cover skin imperfections. This is also the reason for wearing a leotard and pantyhose during exams: to facilitate the aesthetic effect.
Dance practice halls in developed countries have single-room toilets, where students can go in at any time and lock the door to undress and relieve themselves, so there's no hassle of going to the toilet.