Well let me ask you another question: Why do humans pray to God? Do you think that we humans pray only when we are happy? It's the other way around, we humans only pray when we are sad, depressed, not able to get what we desire and so on.
Dukh mein sumiran sab kare, sukh mein kare na koye Jo sukh mein
sumiran kare, to dukh kahe ko hoye
दुख में सुमिरन सब करे, सुख में करे
ना कोय | जो सुख में सुमिरन करे, तो दुख कहे को होय ||
In anguish
everyone prays to Him, in joy does none To one who prays in happiness,
how can sorrow come
As parents (or our parents) we all do so much for our kids but never expect them to pray us, if they show love, care we feel happy but if they don't we never feel sad, we keep on doing what we think is good/beneficial for them, right? Similarly when we bow before the almighty we show our gratitude for there are so many others who are not as privileged as us. So it is not he who is seeking happiness in what we do, it's us. Ask yourself what can you give him who has given you everything?
Even Lord Rama in human form worshiped Shiva to seek his blessings/assistance when he was in crisis. Read here