Grades all depend on the high school you are in. Schools that care more about academics, or are near academic institutions that are high on the lists, tend to have harder curriculums compared to another school that has a higher dropout rate or whatever.
It's like comparing Gwinnett School of Mathematics, Science and Technology (rated #3 of top high schools) to Compton High School which has a 27.4% of students who get scores above proficient which is a C, I'm assuming. The Compton school, because those schools get paid per student, would obviously teach easier courses and give better courses/curve scores so that students wouldnt drop out, whereas the Gwinnett School of Mathematics, would have harder courses, because a diploma from said high school would be looked upon as prestigious from a college recruiter.