At one level, it is best to accept that it just is. However, it possibly has its beginning in the original definition of étudiant(e), which was someone studying at higher levels of education only. This distinction still has application in France.
"From L'Académie Française:
ÉTUDIANT, ÉTUDIANTEnom
xiiie siècle. Participe présent d’étudier.■ Personne qui fait des études supérieures, qui est inscrite dans un établissement d’enseignement supérieur. Un étudiant en lettres, en sciences, en droit, en médecine."
At younger ages and lower levels of education 'élèves' is the general term for students (pupils) in France, although it is also applied more broadly. Lycéen and collégien are also used for students at the appropriate education level.
For all of these, I have seen the expression written as "je suis lycéen/élèves/collégien" etc - if you follow this link, look for an answer from Aurelie about 2 years ago on this aspect
https://progress.lawlessfrench.com/questions/view/je-suis-un-eleve