In the Magical world, Harry Potter was not safe from Voldemort or his followers. This was especially true after Harry survived Voldemort's attack on Harry's family. The death of Harry's parents led Dumbledore to find a safe shelter for the boy until such a time that he would come into his own as a wizard. Petunia is Lily Potter's only sister and is a Muggle. Dumbledore believed that it would be safer for Harry to be hidden among the Muggles with his aunt and uncle than for anyone in the Magical world to attempt to hide him from danger. Since Hagrid lives at Hogwarts in the Magical world, it would not have been safe for "the boy who lived" to stay there.
Harry lives with his aunt because when his mother sacrificed herself to save him, she brought into play a very ancient type of magic that of "blood protection", which offered Harry the most and best protection possible in any world, magical or muggle; however there was a "catch." For Harry to receive and maintain this protection he had to remain with a blood relative, live with that relative and call that place home; since Aunt Petunia was his mother's only living relative, that is where he was forced to go. There was never any option in order to keep Harry alive. His living situation, up until the time he turned eleven and all summers, had nothing to do with laws or legalities; it did however have everything to do with keeping Harry alive, safe and though not entirely as healthy as he should have been, relatively healthy. Brenda
Harry's aunt and uncle are his only living family. Like in America, in England legal custodial care of orphaned children is given to the closest living relative. As long as Harry's aunt and uncle are alive and willing to be his legal guardians, Harry must stay with them. It is the law where he lives. In addition, the two sides of Harry "Muggle" and "Wizard" are maintained because he must exist in both worlds. His muggle side gets him in trouble at school, while his magic gets him in trouble in the real world (like the time in book 5 he has to save his cousin from the dementors).
Lastly, I strongly agree with the two additional explanations offered below by gbeatty.
Good question. Harry lives with his aunt and uncle to link him to family (without them, he would have no living family) and to keep him separate from the wizarding world while he is growing up/until it is time for him to go to school.
There are two other reasons as well. First, from a writer's point of view, it's a dream situation. It allows Rowling to introduce the reader to the world of magic through Harry's eyes. He stands in for us. And second…Hagrid! Think of all that goes wrong with his pets. He'd probably feed his baby dragon food and vice versa.
Harry's mother's spell had saved him from death and to keep his protection, he had to live with his living relatives. Living with them and calling their house his home protected him and kept him from the wizarding world so Voldemort wouldn't be able to find him. This spell only lasts until Harry turns 18.
Harry lives with his aunt and uncle because they are the only ones in his family that are alive. Also Harry didn't know who Hagrid was until he came to their house to tell Harry he was a wizard.
It's because his aunt was the only family he had left. While living with his aunt he hadn't known Hagrid even existed.
Harry had to live with his aunt and uncle because they were his blood relatives. Since Harry still had some family living, that is where he was forced to go. Also, Dumbledore did not want Harry growing up in a wizarding community; he felt that not only would Harry be well-known and possibly develop an ego where he through he was better than everyone else, but he also could be a bigger target for Voldemort when he came back.
Harry never knew Hagrid until Hagrid came to tell him he's a wizard. Although, Hagrid and Dumbledore knew about Harry since he was born, he would not be able to live with Hagrid because of their new found relation and also custodial laws would have to be put in order. Harry who was still underage could not leave immediately from the house and live with someone else while no question arose and I'm sure his aunt and uncle did not want that. Also, Dumbledore wanted to make sure he was safe and HARRY POTTER growing up in an area where no one knew him and acknowledged him and did not attract his attention would be the best thing to assure his safety.
Rowling offers a pretty simple answer for that question. In book 1, Dumbledore explains to Harry that the reason Voldemort couldn't kill him as a baby was because of his mother's love. That same motherly love protects Harry throughout his life. He needs to stay with his aunt because she is his last living connection to that motherly love.
Harry lives with his aunt and uncle for three main reasons.
The first is that they are his only family alive.
The second is that Dumbledore wants him to be safe and not to know what really happened with his life in the magical life until he is ready to listen the truth.
And last but not least, he lives in the house in which Lily Evans, Harry's mother, grew up. This gives him a protection against Voldemort. The house and the people living in it, are protected until Harry grows to be an adult.
harry's mother die to save him and shed her blood on him...this was a the protection of love and the reason that why voldemort cant touch him...anyway for the protection of harry dumbledore make a blood protection which is the strongest spell to keep harry safe..the requirement for the spell was that he should live with the relatives or family member....this is kind of a nerd but the complexity is discovered in the last books..
Actually... Harry needs to stay with family that is blood related to his mom so that he is protected from Voldemort. As long as he lives with his Aunt Petunia, Voldemort can't hurt him. Until his seventeenth birthday, he had to return to Privet Drive every summer to keep Lily's charm alive. As long as Harry could call Privet Drive home, Lord Voldemort couldn't hurt him.
Even though, I am sure Harry would love to live with Hagrid instead of his aunt and uncle. We know that he lives with them because of the "blood relation" but until the last book, we aren't told how important that is. Clearly, his mother wanted him there and made sure that this was carried out until he was of age in the wizarding world. The minute he turned 17, the blood protection would cease for both he and his relatives.