This is the first - and by far the most important rule - when it comes to getting people to be on your side. It's the first principle in the massive mega-classic "How to Win Friends and Influence People" by Dale Carnegie.
Nobody likes being criticized. Nobody.
Yet, people do it all the time. They might think they're "teaching a lesson" or even "helping" the other person, but have no idea how much damage they actually cause.
Essentially, condemning someone for their wrongdoing is probably one of the fastest ways to create an enemy. They might not show that externally - which is especially the case in boss-subordinate relations - but internally they'll despise that person.
You've probably been there and felt that feeling, right? I know I have.
So, bringing up someone's faults is an extremely delicate matter. Not something to be taken casually.
Carnegie explains that the reason why we get so defensive as soon as we hear the slightest notes of critique is because it hurts our pride. It makes us look small and not important. It chips away from our autonomy. We feel as if we're being treated like an infant.
Influencing people to do what you want after they're criticized, is pretty much impossible. They will almost always do the exact opposite of what you want. Even if it goes against all rationale and logic. Logic doesn't matter, they just despise you. As soon as they get a chance.
E.g., you never want to attack anyone with the "why question" ("Why do you always...; why didn't you...") as they relate to a moment when a little kid does something "wrong" like break a vase and gets bombarded with "why's" afterward.
That doesn't mean avoiding feedback. Feedback and criticism are two different things.
But most of us don't know how to properly give feedback - even though we think we do (which usually turns out wrong) - so it's best to keep our mouths shut and give praise instead. Obviously not praise for "bad" behavior but when the person does something - anything - well.