It has been previously established that Slytherin won the House Cup for six years in a row before Philosopher's Stone. We also know that there are two sources of House Points: those awarded (or deducted) by teachers, very often for good work in class,and some sort of Quidditch based calculation. (We also know that prefects can only take away points from their own house, per the wiki, but as we never see prefects add points, I'm not focusing on this)
Given that most points are established based off achievements in class, why isn't Ravenclaw, the house of scholastically minded students, not the automatic winner every year? No one team seems to have Quidditch dominance, and I am assuming that Ravenclaw and Hufflepuff houses are much less likely to misbehave than Gryffindor or Slytherin.