As any dictionary will tell you, terms including class, grade, degree, rate, standard, etc. share at least two separate senses: one of a stage in a sequence, another of a position in a ranking. To those who object that grade is a mark on a scale (grade A, grade B, etc.), the exact same could be argued of class (first class, second class, etc.), level (level one, level two, etc.), and so on and so forth. So let's leave aside what "makes sense." They all "make sense," but we become accustomed to certain nomenclature and so find others, well, foreign, as covered in our various and numerous discussions of other educational terms which vary by locale, from being in college to tutors and seminars to rising juniors to the difference between a diploma and a degree certificate.
According to the OED, the earliest sense of class as it relates to education is of a group of students or pupils who are taught together, attested from about 1560 onwards. In American usage attested from at least the 1670s, this meaning was extended to refer to an entire cohort of university-level students who matriculate and graduate together, a meaning still in use (e.g. a member of the class of 2005).
The term grade referred to the grading of schoolchildren, not in the usual modern sense of scoring for scholastic achievement or other measures of quality, but in the broader sense of sorting and grouping according to a scale, in this case age. You can grade in other ways that are not related to a quality standard. Crushed stone is graded by size, as are coffee beans, and military and civil service ranks are known as grades, whence expressions like above my pay grade arise.
Where the grading (division/sorting) of children was done, instruction could be targeted at a particular age group, the material advancing as the children aged. This was a revolutionary idea in the era of the ungraded one-room schoolhouse, and popularized as part of educational reforms in the mid-19th century along Prussian lines. They could have ranked them into ranks, they could have tiered them into tiers, they could have rated them into ratings, and so on, but as a matter of history they graded them into grades, and here we are.
A school large enough to organize children into classes by age was thus a graded school. You can still find this term in the names of former school buildings or current school districts, or in the occasional old schoolbook, but it became supplanted over time with grade school, which further shifted in meaning to refer primarily to elementary school.
The English education system developed along very different lines from the American one, England having been settled far more densely and for far longer than anywhere in North America. Indian education in turn was heavily influenced by Victorian-era British practices, so it is unsurprising that the terminology differs, as it does in other countries with historical ties to Britain. Consider that in Canada, school years are referred to as grades, but with cardinal numbers— grade five not fifth grade as in the U.S.— and in Australia, they are simply years, e.g. year five.