'Classroom' does have 'class' at its root.
The faster younger kids sat in lessons with the slower older ones. They all overheard lessons taught to older kids before they got there themselves.
Separating kids by age is historically new, harmful, and weird. Traditionally, younger learned from older, who learned better by needing to teach. The experience of teaching might be our greatest loss.