EDIT: What i wrote about lesson was not meant in a good way. As someone said in comments i was punished for being different - that was the lesson.
Yeah, I think it's a horrible lesson and a shame that too many people in powerful positions get away with it.
Yes, you should actually learn the material. No, you should not be punished for being gifted. The school should have recognized what they were dealing with, given you the test the second week and promoted you. Then perhaps you could have been challenged.
This whole "everyone has to go at the same speed" thing is what destroys gifted people.
You could have gone to college early, who knows maybe learned a lot and discovered a treatment or even a cure for many types of cancer or be the next great inventor.
Instead this school taught you to be mediocre and fit it.
What this school did to you and what it does to others is a travesty.
As a society we are destroying our most gifted people, simply so people "feel better"
Turning up every day would have wasted your time, because you would have been bored and frustrated.
A good school would have forced you to turn up but would have let you run ahead at your own pace - or maybe moved you to an environment for the gifted.
Talent is rare and useful. Gifted kids should have the same boundaries and support as everyone else, but work challenges should be stretched in line with their abilities.
I've been through similar situations (tho my breaking points have been more often and exaggerated) and quite quickly I've learnt to quack like an average guy, and to walk like an average guy, but to not be one, in school. I've always been a step ahead from my peers in learning quickly and in investing minimum time to get maximum output from my studies. So I just went to school and acted like the next guy, and did whatever I wanted (whatever being programming, literature, philosophy, etc.) in my spare time.
There is no justice in this, as the headmaster of your school said to your parents, some are just naturally more inclined to apprehension. Furthermore, some like doing it more than others. But sometimes educational staff feel the need to normalise the outliers, because they believe that the rest will believe that them themselves are idiots and won't engage. So they confine those outliers, the smarter ones, to normality, to the average, sacrificing them for the rest. Not only are their assumptions wrong, but the effects may be really bad on the students, dissuading them from exploiting their gifts in the future.
Some people are better at learning. Others are better at other things. Do we break the noses of very good-looking students in the school because they have unjust advantage in getting into relationships? Do we somehow shorten taller students because they score more baskets that the others? Do we deflate the breasts of more bustier students because other girls may get jealous of them? I'm sorry if I sounded a bit harsh and immodest. I don't claim that some are better overall than others, but they are better in some treats. But in situations like in your anectodes and in many experiences I myself had as an outlier, I've seen that this sort of practice leads to a missionary of reducing everybody to the lowest common denominator with regards to educational abilities, rendering public schools futile.
At school I was probably similar, and thinking back basically an awful child, for much of the same reasons. But at least in some of my classes (maths, for example) they recognised that just following the standard course at the same pace as everyone else was a waste of my time, and allowed me to work on the course material for the next years classes, which was at least a little more interesting, and some kind of extra-curricular maths problems as part of an inter-school competition that were much more interesting.
OT - the maths problems didn't always hold my interest, and when I couldn't be bothered doing the actual work of proving something rigorously, I instead wrote a brute-force solver in PASCAL, that produced the correct solution. Then I had the challenging task of persuading people that this was actually an acceptable method of solving a problem. I can't remember if I succeeded, but I think I gave the example of the computer proof of the four-colour theorem that I had read about in New Scientist.
There was a gifted kid in my third grade. He was moved up one grade straight to 5, and again to 7 to finally match rest of the class.
Anecdote warning: I've seen very few kids who skip more than a grade (if that) who have the ability to relate and function among peers well. They're not generally going to be accepted as a peer at that age by kids a couple-few years older than them - and for many, school is where that skill is learned.
Spending years going to classes that do nothing but teach you things you have already mastered is not practice. It's torture. To improve retention and mastery you keep using the skills you've attained to greater effect. The compounding is what matters. Move too slowly and people shut down, tune out, and ignore the material. That's when material is forgotten.
Did your parents agree with this way of schooling? That you were too smart to go to school? That's the only way I could see this happening. Did you study when you weren't at school, or did you simply chill out till test time?
For some students and some schools, being in school is actively bad for them, even worse than a fairly useless homeschooling experience. Some schools are just that bad.
The hard part is getting into college. You can take a test (the GED) that is meant to certify that you have an equivalent to a highschool education. Still, without a transcript, you will have to lean a lot on your resume (jobs, volunteering, internships) and personal statement.