The house sorting system is a lie meant to stratify wizarding society. By telling children they are characteristically predisposed to certain traits you can effectively design a work force. Slytherin and gryfindor for politics and leadership, ravenclaw for teaching, and hufflepuff for service. It’s not absolute, but by reinforcing personality traits on to the houses it drives most of the children into a societal role.