This passage is part of what has become known as the Sermon on the Mount. Jesus is teaching those close to him about how he wants them to live. This section is about practicing ones piety before others. Many of the religious leaders in Jesus time liked to pray in the synagogues and streets so that they may be seen and praised by others.
However, Jesus wanted those closest to him to pray in secret behind closed doors, so that only God could hear them. I am sure it is okay to pray in public, and many of us do that in many different ways. But in this chapter from Matthew Jesus is giving direction about how to pray; alone, and what to pray; the Lord’s Prayer. During your spiritual pilgrimage may you find the time to pray alone, so that God alone can hear your prayers! Vernon T.