If you ignore what everyone in the books SAY about the sorting, and look at how it actually works, in my opinion people are sorted into the houses of the trait they covet, not that exemplifies them the most.
Draco WANTS to be cunning and ambitions- he's not, but that's what he wants to be. To Slytherin he goes, in hopes that he will learn it.
IMO, Gryffindors are those that want to be outgoing- the cowards, the quiet ones, those that aren't sure of their place.
The ravenclaws are those who value knowledge and intelligence. They want to learn, to spend their time studying, debating and learning.
Hufflepuff is for those who want belonging, togetherness, a solid discipline that will serve them well in lives, and get them off their behinds.
IMO, Hermione does not covet intelligence or knowledge. She knows how to get it. She doesn't need to learn how to study, how to attack a problem. She doesn't covet discipline or people accepting her as she is. She has the first, and she probably isn't all that fond of her own social skills.
No, what I believe she covets is the ability to put herself out on a limb- to try that new thing, to speak up, to be somebody, to gain that charisma. To become a leader. The courage to be something new- not what is comfortable, nestled alonein her books and schoolwork.
To me it makes perfect sense that, especially in the lower years, the highest grade of the year wouldn't be in Ravenclaw. If they're that smart, they don't need Ravenclaw. Same with the hardest working- those that disciplined wouldn't need Hufflepuff.
Just think about it- Neville, the Weasley's, Harry himself (both Slytherin and Gryffindor), Luna, Cho Chang, Crabbe and Goyle/Montague (Cunning they are not), etc etc.