The question is HS junior and HS senior. Not med student, law student, post-grad-doctoral student, etc.
Once a student has taken their last 11th grade test, they are a senior. True, if they fail, they may have to repeat the grade, and would go BACK to being a junior.
The logic is "17 year old kid". They are going to want to make themselves as old as possible. So, they call themselves senior as early as possible.
Also, it makes a certain sense. As a father of twin 7yos, I constantly enroll them in camps that say "3rd-8th grade (for children entering those grades)".