And when thou prayest, thou shalt not be as the hypocrites are: for they love to pray standing in the synagogues and in the corners of the streets, that they may be seen of men. Verily I say unto you, They have their reward. But thou, when thou prayest, enter into thy closet, and when thou hast shut thy door, pray to thy Father which is in secret; and thy Father which seeth in secret shall reward thee openly.
Jesus warned against hypocrisy when we pray. We should not purposely position ourselves in public areas so that others will see us praying and be impressed by our piety. If the love for prominence is the only motive in prayer, then, Jesus declared the prominence gained is the only reward. This does not prohibit public prayer. The point is not where we pray. At issue here, is why we pray – to be seen of people or to be heard by God.