Matt 6:5-6 is the second example of the principle of “no footprints” found in 6:1. It concerns prayer and its central idea is simple and profound: let not our prayer lives be “conspicuous prayer.” We all know what “conspicuous consumerism” is: wear Nikes, wear Uggs, wear Tiger Wood golf hats … wear things that get you some notice. Prayer, Jesus says, is not to be like this.
Instead, Jesus says, prayer is to be a private thing: hide, seek shelter, seek anonymity, enter into some secluded part of your home so no one knows what you are doing. Of course, this is all exaggeration to make the singular point that needs to be made: hypocrites find themselves conveniently in public places at the hours of prayer (Jesus is talking about the afternoon prayer time, roughly 3 PM when the afternoon sacrifice was offered) and, “while we are here, we might as well pray.” In so doing, they seek congratulations as conspicuous pray-ers.
Sometimes we have to pray in public; Jesus taught his followers a public prayer (it follows in 6:7-15). So, Jesus is not prohibiting public prayer but warning about praying in public in order to be seen.
It’s a matter of the heart, but seeking privacy is a good way to train the heart to beat for God.