So the thing is in the actual book series JK Rowling never said what House Hagrid was in. We find out that Hagrid actually went to Hogwarts as a student really in the 2nd book–when we see Tom Riddle, the Slytherin prefect confront Hagrid in his own dorm room, and the two seemed pretty familiar with each other.
Hagrid was expelled as a 3rd year. He was born in 1928, and Riddle was born 1926. So Riddle was a 5th year prefect,
Hagrid doesn’t seem like he was particularly good at any branch of magic other than Care of Magical Creatures, so how would the two know each other? Hagrid is 2 years younger than Tom, so how would they have known each other well enough for Hagrid to call him ‘Tom,’ not Riddle?
Now, the prefects are some of the only people the oblivious Harry Potter recognizes from other Houses, other than Quidditch players. And yet we’ve never heard about prefects from other Houses coming in to discipline Gryffindor students. Hell we’ve never heard about people from other houses in the Gryffindor common room period. You really think that Tom Riddle would know enough about a 3rd year Gryffindor nobody, someone who isn’t even his year?
Not to mention this is when the Chamber of Secrets is open, a girl was killed. You think Gryffindor is going to let a powerful Slytherin traipse around their tower, when tensions are running high after being terrified all year? No.
But you know what’s much more plausible? Hagrid was a Slytherin.
Whereas it wouldn’t make any sense to be friends with a young Gryiffindor, young Slytherins are Tom’s responsibility. Tom knowing, and being able to access a 3rd year Slytherin’s dormitory–how he knew Hagrid well enough to know about Arigog, and where he’s kept– makes much more sense. Not to mention they are looking for the heir of Slytherin. Guess what hint hint they’re probably looking at a Slytherin to be accountable for Myrtle’s murder. Not a Gryffindor.
The only reason suspicion fell on Harry was because he could literally talk to snakes, and people who didn’t know enough about what happened in the past made the obvious leap “Slytherin’s monster=Snake; harry can talk to snakes=Harry’s the heir of Slytherin.”
And damn, it makes sense that Hagrid’s a Slytherin. If there’s anyone who’s a true friend to Harry it’s Hagrid, the man who tried to make sure Harry had everything he ever needed (I still get emotional thinking about Hagrid making that scrapbook for Harry. @Dumbledore maybe Harry wouldn’t have been so enraptured by the Mirror of Erised if he actually had a damn photo of his parents).
And it makes perfect sense for Hagrid to be prejudiced against Slytherin. These are the people who threw him away, who got him kicked out of Hogwarts, who would have taken away his home if Dumbledore hadn’t allowed him to stay on as groundskeeper. And yeah don’t get me wrong Hagrid definitely has morals but he’s like the definition of Slytherin loyalty, he’d do anything for the people he cares about. Just think of him hiding Gawp in the Forbidden Forrest. It’s not safe or wise or brave, he keeps that knowledge from even Dumbledore (Dumbledore, who he believes in not because of his ideals or what he stands for but because he is Dumbledore, someone Hagrid is loyal to).
But this is his brother, who is going to get hurt if he stays with the other giants. Think of how Hagrid loves Harry–now, think of Narcissa Malfoy, willing to do anything if it meant the chance her son was alive, even defy Voldemort and go against what her family had been working towards for decades. Hagrid is such a Slytherin parent.
tl;dr sure, JKR might have posted on her twitter or Pottermore that Hagrid was a Gryffindor, but writing is about showing, not telling. And she might have told us that he’s Gryffindor, but she’s showed us he’s Slytherin