What a load of bollocks.
If all characters in all books were perfect and had perfect relationships there would be no interesting storyline and the plot would be non-existent.
These are books about adolescent teenagers growing up in a magical world. As in every other book, film or whatever, there are goodies and baddies, with no perfect characters. There would be no story otherwise.
Many of the characters in the HP books are teenagers. They are therefore suitably immature and can often behave like gits to each other. Precious few teenagers have never behaved like gits, to be honest. Adults too sometimes. Nobody is perfect.
Look at some of the pretty ancient fairy tales. They are pretty dark tales really, and if you remove some of the Disney type of shine that has been put on them they could easily be termed abuse.
Hansel and Gretel could be considered a tale of child neglect and abuse. It is exactly that. Likewise stuff like the treatment of Cinderella by her stepmother.
It is how stories are made.