If I make a sacrifice simply as a way to boost my own pride, God is not pleased. If I do a good deed for someone in order to get them to feel better about me, God isn’t pleased. God is not pleased when I do good in order to increase my stature or my standing with people.
But God is very pleased when I do good and seek justice as an end itself, not a means to an end. Then my good deeds flow from being grateful that God has filled me with His love and forgiveness.
Short and to the point. Give to others not hoping to gain from it but give glory to God in all you do.