This happens often with love interests or children. The character will do things that often times jeopardize the world or the life of the protagonist far more than a number of villains who were cut down for far less but because they are a friend/lover/kid the audience isn't supposed to realize this.
Catwoman in The Dark Knight Rises stole from Bruce Wayne, dealt with villains in ways that made you sympathize with the villains and even betrays Batman to what she thought would be his death. In the end Bruce Wayne seems to not care about any of this and all of these things, despite having ramifications as bad as or even aiding the villains evil plot directly, are Ok, I guess.
Amanda in the Highlander series often did things to deserve the ire of people who came calling for her, betrayed the protagonist and left him for dead or stole his kills and subsequent power boost. But all that is OK because she's his friend so the audience is supposed to not be bothered. That happens a lot in that series.
In the remake of The Day The Earth Stood Still the little kid almost brought about the destruction of the world by sneakily turning the alien over to the authorities. A short time later we were supposed to feel sorry for the kid and want the alien to help him find his way home.
It's when a hero and work perceive characters as good when they actually have done things as bad as or worse than the villains. Additionally, there are often examples of the villains doing similar things but earning death in return rather than friendship.
It's crude. Help me out here.