The friendship between Harry, Ron, and Hermione provides an emotional core to balance out what would otherwise be a really fast-paced and intense series of novels (after all, wars against evil do not make light reading). In Chamber of Secrets, these friendships are what keep Harry going as the rest of Hogwarts begins to suspect him of being the Heir of Slytherin. It's only in the later books (e.g., Ron's feud with Harry in Book 4 and Hermione's annoyance with Harry's bad temper in Book 5) that J.K. Rowling starts exploring the pressures in Harry's life that arise when his friendships aren't there to support him.