Well, with that last line, someone who was once an 8th grade girl is definitely going to respond.
The teacher is not out of line to chastise you for not wearing your gym suit. If it was to the point of being so "nasty filthy" that you couldn't stand to wear it, you should have taken it home to wash quite some time ago. The reason you're not supposed to participate in gym class in your street clothes is the same reason that gym suit is "nasty filthy," because you work up a sweat and stink, and by changing clothes, you aren't walking around subjecting everyone to that sweat and stink all day long (they might be more lenient if gym is your last class of the day and you're going straight home).
Having been an 8th grade girl once, the concept of letting your gym clothes get that nasty is, well, nasty in and of itself. We all took our gym clothes home on Friday, laundered them on the weekend, and returned with them on Monday. And we got yelled at and were not permitted to participate if we forgot our gym clothes on Monday (and yes, this led to the occassional frantic phone call to mom the moment the forgetfulness was realized, just hoping she'd be able to get out of work long enough to drop the gym clothes off at school before gym class, so we wouldn't get a 0 for the day for not participating due to lack of appropriate clothing, or we hoped our friends had enough spare clothing to make do).
There is also never any point in trying to justify your own misconduct by pointing out that others are doing it. There may be a very good reason the teacher doesn't chastise the others who do not change into gym clothing, such as they are already failing and it's not worth the hassle anymore. You have no way to know that, and it's none of your business. You know the rules and are supposed to follow them.
As for it being "stupid," I'm sure that's exactly the attitude the teacher picked up on. Instead of saying, "I'm sorry, I forgot to take my gym clothes home to wash and they are too dirty to wear today," or, "I know, I'm sorry, is it possible I could borrow some from somebody," you probably just rolled your eyes and muttered under your breath. That's the attitude that's coming across in the opening post.
By the way, there is also no reason that an honors student cannot get an A in gym class. Gym class is usually graded on effort and improvement much more than actual skill. I was horrible in gym class for anything that required running, because I'm just a slow runner. So, whether it was softball or soccer or the 600 meter run, I was the one who never made it to first base, or got the ball passed to me, and was dead last, huffing and puffing when I completed the run, but I always tried my hardest, worked on improving my skills, played my position even if everyone kept the ball away, once really surprised my class when they discovered I was great at free-throws in basketball because they had just come to assume I was hopelessly non-athletic, and always finished the run, even if I felt like I was going to die first. That attitude of trying to do your best, even when it's something you're absolutely awful at doing, is a good life skill to develop. Deciding it's "stupid" because you're not very good at it is called quitting, and that's not a good life skill to have.
Ooh, but then 8th grade was also the year we learned archery in gym class, and I finally found a sport I could beat the other students at. That was fun.

And, I think it was also 8th grade when we did weight lifting. Thanks to the rate of physical development differing between boys and girls at that age, I had the immense pleasure of gloating that I was able to bench press more than one of the boys in my class who was on the JV football team.

It's always fun when the "non-athletic, geeky" kid can beat someone on the football team at something in gym class, especially when that non-athletic, geeky kid is a
girl.