this is a complicated question and i think no body could answer it a perfect answer but only Allah but all who will answer are just doing efforts
in my opinion Allah doesn't need any thing even our worship, our worship only will benefit us, there's a hadith qudsi, do you know what's the meaning of hadith qudsi? if not here's the definition
What is hadith qudsi? | Islamhelpline
back to our subject, the hadith qudsi i wish to say is ""'O My servants, I have forbidden oppression for Myself and have made it forbidden amongst you, so do not oppress one another. O My servants, all of you are astray except for those I have guided, so seek guidance of Me and I shall guide you. O My servants, all of you are hungry except for those I have fed, so seek food of Me and I shall feed you. O My servants, all of you are naked except for those I have clothed, so seek clothing of Me and I shall clothe you. O My servants, you sin by night and by day, and I forgive all sins, so seek forgiveness of Me and I shall forgive you. O My servants, you will not attain harming Me so as to harm Me, and you will not attain benefiting Me so as to benefit Me. O My servants, were the first of you and the last of you, the human of you and the jinn of you to be as pious as the most pious heart of any one man of you, that would not increase My kingdom in anything. O My servants, were the first of you and the last of you, the human of you and the jinn of you to be as wicked as the most wicked heart of any one man of you, that would not decrease My kingdom in anything. O My servants, were the first of you and the last of you, the human of you and the jinn of you to rise up in one place and make a request of Me, and were I to give everyone what he requested, that would not decrease what I have, any more than a needle decreases the sea if put into it. O My servants, it is but your deeds that I reckon up for you and then recompense you for, so let him who finds good praise Allah and let him who finds other than that blame no one but himself.' Muslim
so our good/ bad deeds will not benefit / harm Allah, so he doesn't need any of it
so the worship will benefit us not him, so why he created us? to worship him why? to enter the paradise what he gains from that? only him knows but i can say let's think about parents, why they seek a baby? some people how has problem of Begetting they pay thousands of dollars just to be allowed to get a baby although they can adopt another of orphans but why they did that? why to get a baby and bear all of his troubles till s/he becomes adult and then s/he can be too aggressive to their parents and they knew that and when you told them that they tell you a smile of baby equals more than this whole life, it's something inside them which nobody could express this desire except it cause pleasure to them to have a son or daughter, just try to think why we pay lots of money to our kids to educate them to heal them, to.. to ...
for sure i'm not comparing Allah with his creatures subhan allah but our worship pleased Allah he likes to see us loving him, respecting him, worshiping him, fearing him, thinking about him, remembering him, scrifing for him,..
why i said that because of another hadith "Bukhari narrated in his book from Abu Huraira that the Prophet (s) said, "Allah, Almighty and Exalted, has angels who seek the people of Dhikr. If they find the people of Dhikr they encompass them until they reach the first heaven. And Allah asks his angels, 'What are my servants doing?' The angels say, 'O Allah, they are praising You and glorifying You and they are making Dhikr.' Allah says, 'Did they see Me?' The angels answer, 'No, they didn't see You.' Then Allah asks, 'How would it be if they were to see Me?' The angels reply, 'O Allah, if they were to see You, they would be making more praise of You and more glorification of You and more Dhikr of You.' And Allah asks 'What are they asking for?' The angels say, 'They are asking for Your Paradise.' Allah asks, 'Did they see My Paradise?' The angels answer, 'No, Our Lord.' Allah continues, 'How would it be if they saw My Paradise?' The angels reply, 'They would be more attracted and more eager to reach it.' Then Allah asks them, 'Of what are they afraid?' And the angels say, 'They are afraid of hellfire.' and Allah asks, 'How would it be if they saw my Hellfire?' and they reply, 'They would be running more and more away from it and asking more and more protection from it.' Then Allah said,' I am making you all My witnesses: that I am forgiving them of all their sins.' Then one angel asked, 'O our Lord, there is among these people one who is not from them, he came only to ask for something from one of them.' Allah said, 'Those are my beloved ones who are making My Dhikr. Anyone who comes into their circle will be forgiven, and I am forgiving him.''
also another hadith Verily Allah boasts of the people of Arafat before the people of Heaven (angels) saying: ‘Look to my servants who have come to Me disheveled and dusty.’”
hope this helps
and i believe the most correct answer is Allah knows the best