Pharisaism
Christ said of the Judaeans that “these people honor Me with their lips, but their hearts are far from Me”, where He was quoting Isaiah 29:13.
Public Fasting
Matthew 6:16 And when you should fast, do not be like the sullen-faced hypocrites, for they obscure their faces that they may appear to be fasting to men. Truly I say to you, they have their reward. 17 But you fasting anoint your head and wash your face, 18 that you should not appear to be fasting to men, but to your Father to whom it is in secret. And your Father who seeing shall repay you in secret.
As seen with public charity and prayer, we see that outward displays of piety are scorned. That is because they are used as crutches by the weak, or as pretenses by the ungodly. The godly man will naturally manifest his piety through actions on behalf of his brethren, and not through nice speech and feigned displays. It is easy to pray and to fast and to look good doing it, but it means nothing. It is harder to give to one's brethren even one's life, and to expect nothing in return. From Isaiah chapter 58:
“3 Wherefore have we fasted, say they, and thou seest not? wherefore have we afflicted our soul, and thou takest no knowledge? Behold, in the day of your fast ye find pleasure, and exact all your labours. 4 Behold, ye fast for strife and debate, and to smite with the fist of wickedness: ye shall not fast as ye do this day, to make your voice to be heard on high. 5 Is it such a fast that I have chosen? a day for a man to afflict his soul? is it to bow down his head as a bulrush, and to spread sackcloth and ashes under him? wilt thou call this a fast, and an acceptable day to the LORD? 6 Is not this the fast that I have chosen? to loose the bands of wickedness, to undo the heavy burdens, and to let the oppressed go free, and that ye break every yoke?”
So we see that Yahweh would rather have us act justly, than to act unjustly and attempt to justify ourselves through prayer and fasting.
Public Prayer
Matthew 6:5 And when you pray, do not be as the hypocrites, because they love to pray in the assembly halls and standing at the corners of the streets, that they should be seen by men. Truly I say to you, they have their reward! 6 But when you would pray, go into your closet and closing your door you shall pray to your Father who is in secret, and your Father who sees shall yield to you in secret.
In 1 Samuel chapter 1, we see that Hannah's prayer was answered when her lips moved, but she spoke it not, having prayed in her heart. Likewise, the prophet Daniel prayed alone in his room, and it was not necessarily his intention that he be seen through his window by his enemies, as it is related in Daniel chapter 6. Daniel and Hannah, while seen by others, were both praying privately. The apostles often prayed together, but they prayed privately, and not to make a show in front of others.
Christians who insist on public prayer, or that others must pray with them, are simply looking for a crutch. They want others to see how “pious” they are, that they may justify themselves. Real Christians do not need crutches, nor do they need outward displays of piety, which are pretentious. We should have no need to be seen praying publicly or with others. We should seek our God with our hearts and display our love through good deeds for our brethren, and not merely in the pretense of exhibition.