It's true that life is not fair, but it's especially difficult when something completely senseless and unexplained happens. If you attended all the classes, why did they punish you? At least you found a way to work past that hurdle. And thankfully you had the support of a good friend!
Some of the classes were online, I believe the class rep didn't keep accurate attendance, and she did agree and apologized for that.
I wasn't the only one affected. But I was expecting a proper investigation to be made at least.