It’s easy to read these verses – and to think about them – out of their immediate context, but have you ever noticed what that context is? In Matthew 6 Christ instructed his disciples on a number of aspects of religious life – beginning with the warning: “Be careful not to practice your righteousness in front of others to be seen by them. If you do, you will have no reward from your Father in heaven” (Matthew 6:1). He then proceeded to elaborate in three areas: giving to those in need, prayer and fasting.
In each case, Christ singled out the religion of those who were not doing right for the right reasons. In the case of those who gave to be seen giving, he stated: “Truly I tell you, they have received their reward in full” (Matthew 6:3). He then went on to talk about those who prayed to be seen of others, ending with the same statement exactly: “Truly I tell you, they have received their reward in full” (Matthew 6:5). In his final example, Christ spoke of those who fasted for show and religious recognition, and – as you doubtless guessed – ended with the same “… they have received their reward in full” (Matthew 6:16).
In every one of these cases, Jesus instructed his disciples to give, pray and fast secretly and assured them that “ …your Father, who sees what is done in secret, will reward you” (Matthew 6:4, 6, 18). It is then, at that exact point, that Jesus announced: “Do not store up for yourselves treasures on earth … But store up for yourselves treasures in heaven …” (Matthew 6:19-20). So this injunction follows directly after the repeated statement that those practicing religion for self-gratification or to be seen of others have their reward in the present world, but those who practice true religion will be rewarded by God.
It is perfectly possible Jesus had switched thoughts and the instruction to lay up treasure in heaven stands alone and is simply warning against putting our trust in earthly treasures and possessions. But that thought is not found in the context, and it seems more likely that Jesus was instructing us to conduct our religion for the right reasons so that we have a reward stored with God that will be given to us later ("Look, I am coming soon! My reward is with me, and I will give to each person according to what they have done" – Revelation 22:12), rather than a reward we recieve now.
In either case, the warning against self-gratifying and self-elevating religion is clear in Matthew 6, but the problem can also be expressed in less obvious ways. Can we think of ways in which we ourselves may fall down in terms of the examples Christ gave? When praying publicly, do we speak to God or speak words to please or impress those around us? Do we give when we are asked to give at work or in some other public setting because it would not look good not to do so? If we fast, do we do so at times others will be aware? Giving, prayer and fasting are only three areas – are there other aspects of our religion that we do with an eye to how those things will be perceived by others? Christ’s words remind us that God does desire to reward our religion – but only if it is directed at and through Him.