In Matthew chapter 6 it talks about doing things privately and then receiving rewards from the Father in Heaven. There are three things we should do.
1. Give privately (verse 4)
Give your gifts in private, and your Father, who sees everything, will reward you.
2. Pray privately (verse 6)
But when you pray, go away by yourself, shut the door behind you, and pray to your Father in private. Then your Father, who sees everything, will reward you. (v6)
3. Fast privately (verses 17-18)
But when you fast, comb your hair and wash your face. Then no one will notice that you are fasting, except your Father, who knows what you do in private. And your Father, who sees everything, will reward you.
God tells us to do these things in private as it is so easy to do them publicly to receive praise from others.
Because of this our acts of giving, prayer or fasting can be done with impure or selfish motives, the right things for the wrong reasons.
These three things are a good reminder to question our motives for the things we do. Are they self-centred or God-centred?