The focus of doing right in the the Christian life is Soli Deo Gloria which means "Glory to God Alone". The motive behind the work if it seeks that God be glorified and only He alone, that is a real good work otherwise it is not a good work. Men of God do what is right even if it means that everyone is displeased. In truth, if God is pleased, so what if somebody hates the Christian for doing what is right? But the problem is that people love the praises of men that they forget the praises of God. People usually think of not offending anyone, pleasing everyone but God. Most people are just angry with God wishing that He was not real or He would not exist.
The best example of not pleasing man but God is Jesus Christ. He did the mission of His Heavenly Father who sent Him to be God the Son with us in full compliance. He knew very well how much opposition there will be. Satan tried to get Him to sin. The Pharisees wanted Him dead for challenging their self-righteousness. When Jesus did what was right, He only wanted the Father to be pleased. Before Him, the prophets did not care about acceptance as long as God's will be done. The apostles continued the example of Jesus by sticking with God be pleased and no other. That is the whole mission of the Christian life.