In case you need more context, Matthew 6:5-6:
And when you pray, do not be like the hypocrites, for they love to pray standing in the synagogues and on the street corners to be seen by others. Truly I tell you, they have received their reward in full. But when you pray, go into your room, close the door and pray to your Father, who is unseen. Then your Father, who sees what is done in secret, will reward you.
Edit: Please remember that the bible is very internally inconsistent, and it's obviously not factual. It's just funny that the people who claim to be christians don't know their own book.