Every tradition that prays has had to meet the obvious objection, and the answers are not the same answer in different words.
The petitionary problem is sharpest where God is held to be both all-knowing and unchanging: if God already knows the need and has already settled the outcome, asking can neither inform nor persuade. Classical Christian and Muslim theology generally answers that prayer is a cause God has ordained rather than a lever applied to God, and that its principal effect is on the one praying. That is a coherent answer, and it satisfies almost nobody in distress, which is why the practice has always outrun its own theology.
Traditions without a personal God pray anyway, and this is where comparison earns its keep. Theravada Buddhist chanting is not addressed to a being who can grant requests; it is understood to settle and purify the mind of the chanter and to generate merit. Recitation before a Buddha image is not petition in the Abrahamic sense, and calling it that is among the commonest errors in general accounts. Jain practice is stricter still: the liberated souls invoked in the central Jain formula cannot intervene and are not asked to, and the recitation is an act of orientation rather than of request. To read either as a weaker form of asking God for things is to misdescribe it.
Efficacy studies exist and are worth stating plainly. Trials of intercessory prayer for medical outcomes, including a large multi-site study of cardiac patients published in 2006, have not found benefit. Believers reasonably object that the design assumes exactly the mechanical account of prayer their own theologians reject, and that a God who responded to randomisation would be a different sort of God. Nothing in the results settles whether prayer is worth doing, and most people who pray have never treated it primarily as a means of obtaining outcomes.