The ultimate purpose of God answering prayers in the Temple is to create a deep awareness of His active role in the world and to root a profound sense of awe in the hearts of the people. This respect and awe take hold through two primary paths.
The first path involves understanding the direct link between human actions, divine discipline, and forgiveness. When the Israelites experience hardship or illness and then find relief after repenting and praying at the Temple, they realize their suffering was not a random accident. Instead, they recognize it as a consequence of their wrongdoings. Seeing that God's hand both delivered the blow and provided the healing naturally leads them to a deep sense of awe [רד״ק, מצודת דוד].
The second path centers on the overwhelming feeling of God's presence within the Temple itself. Knowing that all prayers are intimately heard in this holy space creates a powerful realization that nothing can be hidden or faked before Him. Standing in a place of such absolute truth strips away any ability to deceive, bringing a person to a state of genuine awe and respect [ביאור שטיינזלץ].