Why do we pray to God if He already knows everything?

Are you, O Lord, since eternity is yours, perhaps unaware of what I tell you, or do you only see in time what happens in time? Why, then, do I recount so much to you? Certainly not so that you may learn it from me, but I lift up my heart to you and the hearts of my readers, so that we may all say: “The Lord is great and greatly to be praised.” I have said it and will say it again: “Out of love for your love I do this.” For we also pray to you, although the Truth says: “Your Father knows what you need before you ask him.” To show you our devotion, we confess to you our misery and your mercy upon us, so that you may completely free us, as you have begun, so that we may cease to be wretched in ourselves and be blessed in you; for you have called us to be spiritually poor, meek, to mourn, and to hunger and thirst for righteousness, merciful, pure in heart, peacemakers. Behold, I have told you much to the best of my knowledge and will; for you first willed that I confess to you, my God and Lord, for you are gracious and your goodness endures forever.

Source: Augustine of Hippo, Confessions, Book 11, Chapter 1