Ok, I may be 37, but since I don't have kids yet... I totally feel like I just got out of highschool some days. Your situation reminds me about how I got detention for something I didnt' do. And the "teacher" homeroom monitor that gave it to me was the guy I grew up with down the street that was my brother's age. He was a recent college grad in coaching and his dad was our principle and a very good friend, like an uncle. Well, I think the "power" went to his head. I was a 10th grader at the time and I had asked if I could go to the bathroom. When I went back to the auditorium where our study hall was, he was standing outside seemingly waiting for me and because I came from a different direction that what the nearest bathroom was, he thought I had gone to the school store to goof around in the Commons (the name of the lunchroom area where the Jr's and Sr's got to hang out for study hall, relatively unmonitored. He didn't believe me when I told him I had gone to the other girls room, so I just had to deal with detention. That was the ONLY time I ever got it before or after so I would think my "good record" would have counted for something. My one consolation is that the detention teacher and the kids there, although slight troublemakerish reputations, all were nice to me and the teacher actually thought it totally bogus that I had to be there. I coulda been a brat and gone to the principle (his dad...but I didn't want to be that way) as all the other kids never talked to the principle unless the world was coming to an end. I had known the man since I was a toddler so he never seemed like a bad guy in my eyes.
Then, once in college, I was crammed in a huge biology class and made the mistake of tilting my head or moving my eyes in such a way that made the professor holler out, "You, (pointing at me), eyes on your own paper!!" I was so embarrassed and shocked I could barely finish. I was super scared but had to defend myself so I schlepped to his office to say I was sorry, that I didn't cheat and never had and I meant no harm. He was still a little gruff, but I think the fact that I went to his office immediately after class to say something to him helped me. I still shudder at that incident!
So, in a huge nutshell, it does suck when stuff like that happens and you get dinged for something harmless that wasn't what it seemed. You'd think he'd give you a 1 time warning. Things are getting so a kid can't be a kid anymore...hang in there, we're here for you, and we all understand!!!