Prayer is a form of penance. Penance is performed to bring about a deeper conversion.
Penance, including all suffering, which is offered to God, is very pleasing to Him. He reciprocates with many graces and consolations.
Penances can also be done as mortificiations that discipline the body, helping us to detach from worldly desires.
That is why the great saints loved to do penance so much. They got so much out of it, spiritually. The more they grew closer to God, the more severe the penances b/c so much spiritual power came from it. God literally did their bidding.
St. Therese of Lisieux had such a close relationship, she felt comfortable enough to say that God was obligated to her to grant her wishes. And He did. Still does. She offered, literally, everything to Him, and dialogued with Him almost continuously, as a person would a soul-mate. She approached the Father much like an indulged child.
This is the closeness God wishes from all of us. Penances are pleasing to Him b/c they empty us of our worldy attachments, and He is able, then, to fill in the emptiness.
Incidentally, complaining, or trying to avoid all suffering/discomfort/inconvenience is very displeasing to Him. I’ve got serious issues in this department, so, go by what I say, not what I do, as my gm used to tell me.