Characters are more than just their house’s traits.
Cedric Diggory, a boy who practically embodied the values of Hufflepuff house, was ambitious, determined, and maybe even a bit cunning, traits of Slytherin house.
Remus Lupin, a Gryffindor, was very intelligent, witty, and accepting, traits of Ravenclaw house.
Horace Slughorn, head of Slytherin house, was kind and compassionate, traits not normally associated with Slytherin.
And Gilderoy Lockhart, sorted into Ravenclaw, was cunning, ambitious, and self-perserving, traits always associated with Slytherin.