Matthew 6:5
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 men. I tell you the truth, they have received their reward in full.

The Messiah rebuked people who wanted to get public attention to their act of righteousness, also inside the synagogues. God who sees everything and knows everything, rewards those who do not try to get any glory and fame that belongs to our Father in Heaven alone.