Moaning, whining and complaining is a hobby for some people. If you KNOW you did it right, then ignore them. If you think there is a possibility that you might have done it wrong, then listen and you might learn something.
It happens sometimes. You've the right thing. If you are reprimanded/scolded/yelled-at, here are some poss. reasons why: 1. You are wrong in that you think you were doing right. 2. Those unhappy with what you've done, don't understand all of the facts, & therefore they are wrong. 3. Some aren't pleased, no matter what you do. They have nothing better to do than to pick. 4. If you are right, and you know it, others may say it is wrong, because they are afraid of something (being harmed themselves, or harm to someone else), or, they are downright evil.
This last one is interesting, because it has a scary, social dynamic.
What I mean: It's generally accepted that Integrity is doing the Right thing, even when nobody's watching you.
But what if everyone is going along with something that is very definitely wrong?
Example: During WWII, there were people who tried to help those being persecuted for their faith, race, & color...even though they knew that if they were to get caught, they would be killed or persecuted themselves. But they did the right thing, anyway. Or died, trying.