Since you see everything from Harry's perspective, you can frequently make bad assumptions about other people and their motivations. This isn't that person X acted evil but turned out good (or vice-versa), it's that Harry makes a bad assumption about person X because of incomplete information, and turns out later to be mistaken.
The books (at least the first four) are primarily mystery stories, and mis-direction as to who the "bad guy" really is, including some red herrings about innocent folks, is a good thing in a mystery. Compare to most kid lit, where you know who the villain is the first time they appear in the story...
Also, Harry continuously breaks the rules, never suffers any consequences, and indeed, is often rewarded for breaking the rules in the end.
I wouldn't say that he never suffers consequences -- he's frequently punished for breaking rules (in many cases, these punishements set up plot points by putting him in a specific location at a time he otherwise wouldn't be there). But what teenage boy (or pre-teen) isn't a little rebellious? In the end, Harry does things for the right reasons, even if he makes mistakes along the way.
Here is one parent's testimony: My daughter, who is twelve now, has read Harry Potter books or had them read to her since she was four. She has always gotten the point that the wizard/muggle distinction is a figure for differences between more and less gifted people. She has learned from the books that if you have gifts, they don't make you better than other people; that good and evil are real; that true authority is real; that growing up involves making decisions about right and wrong that really matter; that it takes courage and loyalty to good people and good principles to make a good life. She has also, of course, had a whale of a lot of fun. She is a passionate Christian and has shown not the slightest interest in the real occult.
People who get exercised about Harry Potter ought to read one of the polemically anti-God books by Philip Pullman. I've told my daughter that those she may not read until she is an adult, if she wants to then, because the author has set out deliberately to confuse kids and alienate them from their faith. Her response is on the lines of "Yuck, who'd want to read that?"