There are some things you can't share without liking each other, and knocking out a twelve-foot mountain troll is one of them.It is shared experiences that bind people together and it's the events here, where Ron and Harry accidentally lock Hermione in the toilet with a troll, then go in to rescue her, following which she has the presence of mind to take all the blame on herself, that begins their friendship.
(This, incidentally, is why I accept the canonical Ron-Hermione relationship lasting. Not because they're well matched; they're not. But they both know the other one is always there for them no matter what.)
Dumbledore of course is brilliant and terrible. When he declares that all he sees in the Mirror of Erised is himself holding some socks,
...it struck Harry that Dumbledore might not have been quite truthful.Well yes. He's protecting Harry, teaching him the skills he needs to survive and also positioning him as the back-up plan if he, Dumbledore, fails to stop Voldemort. He suspects, but is not sure, that Harry is protected. It is, of course, Harry's best hope if Dumbledore can't stop him. Yet if your plan involves setting an eleven year old boy in the path of a terrifying Dark Wizard, I really hope your deepest desire is for more than socks.