Jesus prays a “prayer of thanksgiving” before commanding Lazarus to come out of the tomb. This prayer has been discussed with respect to the possibility of historicity – is it the type of prayer that Jesus might have prayed in this context? Some scholars dispense with the historicity of the prayer as an addition by the writer of the Gospel. For example, R. H. Fuller, (Interpreting the Miracles) wrote that:
To the modern reader this prayer is irritating, if not offensive. The whole thing looks like a put-up show, anything but genuine prayer. Jesus knows he need not pray, but apparently stages a prayer to impress the bystanders.
Rather than an “irritating prayer”, this is actually a Prayer of Thanksgiving as prayed by Jews commonly in the context of first century Palestine. Following J. M. Robinson, Bingham Hunter has demonstrated that there are formal parallels to a Jewish thanksgiving prayer. As a Jewish Hodayoth, the prayer is intended to be heard by the audience for which it is prayed. The cited article lists many examples (including in the Pauline and Qumran literature) indicating that this sort of prayer was not only common enough in the first century, but expected in a religious context such as the one Jesus finds himself in John 11.
Because of its form the prayer seems to be genetically related to and a part of a tradition of piety exemplified by the Jewish personal thanksgiving psalm. Thanksgivings of this sort are characteristically prayers that both God and spectators are meant to hear.
With respect to the scholars that find offense in the prayer, Hunter points that the offense is entirely modern. Read in the context of the first-century, the prayer is exactly the sort of thanksgiving prayer we might have expected.
Bibliography: R. H. Fuller, Interpreting the Miracles (Philadelphia: Westminster, 1963); W. Bingham Hunter, “Contextual And Genre Implications For The Historicity Of John 11:41b-42” JETS 28:1 (March 1985) 53-70.