Warning! You may not want to read this if you haven’t read too many Harry Potter books yet. Particularly, the 2nd book. There is a slight spoiler from the 4th book as well.
An excerpt from the end of Harry Potter and the Chamber of Secrets:
“Ginny!” said Mr. Weasley, flabbergasted. “Haven’t I taught you anything? What have I always told you? Never trust anything that can think for itself if you can’t see where it keeps its brain?”
But what about the Sorting Hat? It can think for itself, right? Does it have a brain? If so, where does it keep its brain?
As it turns out, it does have a brain. Or “some brains,” anyway. Time for another excerpt….
The founders put some brains in me
So I could choose instead!
– from the Sorting Hat’s song, book 4.
Now, is the Hat trustworthy? Well, are the founders, Godric Gryffindor, Helga Hufflepuff, Rowena Ravenclaw, and Salazar Slytherin trustworthy? I suppose the obvious answer is “all of them are, except Slytherin.” But at the end of the second book, the Hat helps Harry defeat the basilisk that Slytherin put there* to kill all the Muggle-borns in Hogwarts. If the Hat’s brain is 1/4 Slytherin, it might not have come. But its brain is just 1/4 Slytherin… the other 3/4 could have convinced the 1/4…. Think about it if you want.
Another thing! Do the quarters of the Hat’s brain argue/fight with each other? It doesn’t seem like it. Maybe the founders put some brains in it before they started arguing about pure-bloods and muggle-borns and half-bloods and all that, so the brains at the time weren’t disposed to argue with each other.
*Well, he may not have personally put it there, but he did intend for there to be some “horror within” the chamber.