The virtue of religion is part of the virtue of justice, to give each his due. Source-St. Thomas AquinasActs of religion are prayer, adoration and sacrifice.
Does God need our prayers, our adoration, our sacrifice (Jesus on the Cross)? No. Then, what is the purpose of religion if it is to give God what He is due, but He doesn’t need it? The virtue of religion (and justice) is rather for our need. Our need is to redirect focus from ourselves to the other. Love is willing the good of the other for the sake of the other. We cannot do that if our focus is on ourselves. In focusing on giving God ‘His due” in prayer, adoration and sacrifice we are forced to see that we are not the source of our creation, the source of Love, and the source of salvation.