Public prayer should never be primarily about teaching. While a well written prayer will remind people of the nature of God and may reveal more of that to the people praying, this is not its main function. Prayer is about talking to God; praising him; petitioning for him to act; pleading for him to act differently; and so on.
The relationship between people and God is being expressed in this action. Attempting to use public prayer for instruction distracts from the main event. Often, this is done unintentionally, such as where it is an element of a person’s style to speak in an instructional manner or where the person praying has fallen into a trap of undervaluing prayer. Other times it is done intentionally.
Intentional redirection of prayer away from its primary function can be very unhelpful. Not only can this distract from talking with God, it can also increase division. I have encountered cases where people appear to have chosen the words and topic of their prayer to rub issues in the congregation.
Perhaps they felt that there would be no room to respond to their point in prayer time, so the other side would be forced to listen through the argument. However this came across as disrespectful towards God as well as the other members of the congregation.
I have also seen cases where it seemed as though the person leading the prayer aimed to convince the congregation of their view of a particular social problem, and their opinion of its solution. I felt that this implied that the person praying did not have room in their mind for God acting, but only the power of our human actions.
Treating prayer as a teaching time instead of talking to God is likely to stem from multiple problems. The first is our perceived distance from the spiritual. We are spiritual beings in some sense as humans, but we are rarely if ever aware of our relation to the spiritual.
Our experiences seem to center in the physical-mundane realm and so too does our attention. It is easy to fall into part of the secularism that surrounds most of us and undervalue prayer.
Second
The second problem I see is a kind of Gnosticism. Especially in the churches I grew up in, there is a tendency towards measuring the faith by knowledge. In this line of thinking, knowing God is equated with knowing about God. Knowing about God is extremely useful to faith, but it is not the same as following God.
However, again it is easy for us to slip into the scientific world view prevalent in Western Society and value knowledge over relationship with God. It is easier to know where we are at and feel progress, and it is even more so as our perceived distance from the spiritual bars our understanding of our place with God as his followers and adopted children.
While relating with God is the primary element in prayer, teaching appears to have long been a secondary purpose. I doubt Paul’s letters included his prayers merely for the encouragement of knowing that he was praying for the churches.
I suspect there was intent to model for us how prayer can be. Additionally, the content of these prayers help us understand the Gospel. Teaching happening as a secondary function of prayer is helpful.
With the spiritual seeming distant and knowledge being so highly valued, it is little surprise that prayer becomes teaching. However, this should remain secondary to expressing ourselves in relationship with God. We learn from the prayers in the bible as well as the prayers of those around us.
They can be a great encouragement, but treating prayer as teaching can quickly distract and discourage. There are other factors that cause prayer to devolve into teaching, I think particularly of the relationship between private and public prayer (perhaps there is something you would add which I have not considered).
However, I think the perceived distance from the spiritual and a tendency towards a Gnosticism are important factors, at least in the churches I have known best. So what will you do next time you are praying with other people to keep the focus where it should be? Namely, on talking with God.