Agree here. As much as this can be hard for you, it can be a life lesson.
One, like jespah said you can reach out to those responsible in making this decision to find out why you do not get this position. Very important, be respectful about this. Ask if you can find out what caused you to fall short so you in the future you can be better prepared for similar situations.
If you find out it is only due to your absence, again politely explain your situation. You can say, you may not understand but this is why I missed this time. It may not change anything, but at the least you will feel you are heard. You also may learn that there could be other reasons.
In the end, they have the power to decide. And yes, often times in life things are unfair. But on the positive you will have experienced this and will learn the best way to handle. By still being the best you. Also, you will learn how to respectfully stand up for yourself. This in itself will help you gain confidence and learn how to be an advocate for you, but hopefully in a mature and positive way.
One other thing, I understand you are writing on a board here. But when speaking or writing to these individuals here, please use correct wording and not short cuts like you are texting a friend. You will be taken much more seriously by older folks and it shows you are making a greater effort.