This question already has an answer here:
“O mankind! It is you who stand in need of Allah, but Allah is Rich [Free of all wants and needs], Worthy of all praise” - Surah Fatir 35:15
“And I (Allah) created not the jinn and mankind except that they should worship Me (Alone)” - Surah al-Dhaariyaat 51:56
If Allah doesn't need us, rather we need to worship Him, then doesn't that invalidate (or at least weaken/nullify to an extent) the purpose of human beings to begin with? What kind of paradoxical and confusing cycle is that?
Or are there purposes other than worshipping Him that I am unaware of? Is the test of life and passing it the purpose? If so, then it is quite purposeless because once we pass it we go to heaven and chill there for eternity (or fail and burn in hell). That's all? How and why can that be considered a purpose? Is that all we are meant to do?
These thoughts have been bothering me lately. Help a brother out if you have the knowledge. Jazakallah.