Jesus is not warning us against public prayer; He prayed publicly many times, and the disciples gathered to pray as a body in the early chapters of Acts. What He is warning us against is the prayer that has shifted audiences without us even noticing. The hypocrite did not wake up one morning and decide to perform; he drifted there. Someone complimented his prayer once. It felt good. The feedback loop quietly turned the prayer outward, until the words that began as worship became words crafted for who might be listening.
R.T. France notes that the hypocrites in Matthew 6 are not those who fail to live up to their ideals, but those whose visible religion is the whole of their religion; there is nothing behind the performance. That is a sobering line. Performance can look almost identical to devotion from the outside. The difference lives in the heart, in the unseen question Jesus is asking us today: Who do I want to see me right now?
The reward of the performer is already paid in full. People saw, people approved, and that is all there is. The reward of the child who prays to a Father who sees in secret is the Father Himself, and a relationship that no audience can give or take away. The choice is in front of every one of us, every time we open our mouths to pray.