Why do Christians flaunt their prayers publicly when Jesus strictly forbade it?
The key to your questionis “flaunt”. God wants us to pray for one another. In Acts 12:12 the saints were assembled together praying when Peter came to the house, “And when he had considered the thing, he came to the house of Mary the mother of John, whose surname was Mark; where many were gathered together praying.” The religious leaders would go out in the public to be seen of men. They have their reward!
I quite agree with you on that point. I suppose the main reason why Christians will make a public display of their prayers in front of others is to impress those around them with their great devotion. It can be a natural impulse similar to what one has when feeling grief at a funeral and most will understand that emotion of loss. There are really no set rules about this. I do feel what is of great value is when many are together and unite in prayer to raise the vibrations of the world around us and to send out loving thoughts that heal. Love is a strong current and when set in motion it goes out to help all those in need.