The act of prayer, the obedience of prayer, does not necessarily bring God glory. Prayer is what is expected of us; but it is the answers that come from our prayers that bring Him glory and us joy. The whole point of prayer is to get answers.
E. M. Bounds has said,
It is not the marvelous array of argument and eloquence in praying which makes prayer effectual. Not one or all of these are the things which glorify God. It is the answers which brings glory to His Name…Better not to pray at all than to go through a dead form, which secures no answer, brings no glory to God, and supplies no good to man.
E. M. Bounds, The Possibilities of Prayer (Baker Book House: Grand Rapids, Michigan) 1979, pp. 87, 109.