First of all, as a teacher, I am pretty laid-back about the dress code. Mainly because I don't want to police it. I have too many other things to do. So my compromise is that I make sure the students are aware of what a proper dress code looks like, why it's important, and then I leave it up to them to choose to follow.
So, why is it important to be properly attired for dance class (I'm talking from a ballet class standpoint here, but it applies to other styles as well).
It helps the student be comfortable. This may sound odd, because one of the main reasons students object to wearing ballet clothes is they say they are UNcomfortable. But the thing is, you don't want any distractions. If you have on loose, baggy clothes, they WILL get in your way. You'll be constantly adjusting, pulling them up, shaking a sleeve back in place. If your hair is in your face, it will cover your eyes or your pony will slap you when you turn. All of this will make you hold back in your dancing. If you are dressed properly, you won't have anything to worry about or fix or adjust.
2. It prepares your mind for ballet class. If you're going to mow the lawn, do you put on heels and a sequined dress? Do you attend a special event in your pajamas? If you're going to be painting, do you put on your favorite outfit? No, you dress for the thing you are going to do. Putting on my muck boots tells my brain I'm about to go deal with some goat poop. Putting on a dress and makeup tells me I'm going somewhere special or important. Putting on ballet clothes and putting my hair in a bun tells me I'm done with school or work or play and I'm going to focus on ballet for the next hour. It's hugely important and helpful.
3. It helps you be ready for the big events. Performances, auditions, master classes....all of these events absolutely require a particular dress code. If you never ever take off your booty shorts during class, how are you going to feel about that platter tutu you have to wear for Nutcracker? If you insist on wearing a t-shirt over your leotard in class, are you going to be too self-conscious to attend that audition or summer program? If you never put your hair in a proper bun, will you be able to do a good one when you're dancing a lead role? Or will you have to beg your friends to help you?
4. It helps you progress as a dancer because your teacher can give you better feedback. We don't become better dancers by repeating the same mistakes over and over. We become better dancers by hearing corrections and then practicing the RIGHT way. If a student is wearing too many layers, the teacher can't really comment on alignment or posture. Not only that, the student can't SEE what's going on in the mirror. She could be leaning WAY to the left, and I won't know it or be able to help her see the difference. I always tell my students that they will make the most progress if they are doing their best AND I can see it!
5. It gives you body awareness. One good posture reminder I heard from a teacher was, "Stay inside your leotard." Twisting, leaning, etc pulls the leotard out of place. The leg line is in the spot where the leg is supposed to move, without moving the pelvis around. It gives you guidelines.
A lot of times, you'll hear that a big reason for the proper dress code is to "respect the art" or "respect your teacher." I disagree. While I'll always remind my students to adhere to the strictest of dress codes when attending a class for someone else, for me, this is not important. I would rather they show respect for me by being attentive and working hard, regardless of whether or not they are perfectly dressed or their hair is in a perfect bun. As far as respecting "the art"....art is what we make it. Art is for enjoyment and enrichment. My job is to teach it, but it's ultimately up to the student how they will apply what I am teaching. Maybe they'll do every single thing I say. Maybe they'll do some of it, but choose their own path elsewhere. Maybe they have different priorities. That's fine. I'm not offended or disrespected by this. The dress code, for me, is just like anything else I'm teaching. For example, if I give a student a correction on her dancing, there's no ultimatum attached. She's not going to be removed from the class if she doesn't follow through on that correction. It's up to her to decide to do it, to understand how it works, etc. I might remind her every time she does the thing, but I'm not mad if it doesn't happen. Sometimes we need more time, or a different mindset, or maybe we simply don't find the correction helpful. Or maybe we just really hate that step so we don't care about perfecting it today. So...I'll make sure my students know how to dress and why to dress a certain way. But the rest is up to them.