This is actually an important and fundamental question. So I am re-framing it for providing the explanation:
If the law of karma is as such that a man reaps what he does, then what is the necessity of worshipping God? If one will do good, then irrespective of whether he worships God or not, he will obviously get good in return. So is also the case for doing bad. So when God being just and impartial gives results only as per one's actions, then why should He be worshipped and also for what reason?
Secondly, it is not that we are in the debt of God because He created us and hence we should worship! Because God didn't create us, jiva being an energy of God, is also eternal just like God (BG - 15.7). In course of time the material world manifests and dissolutes and the jivas come into existence and go out of existence. So because we are not in debt or something for our existence, then why should we worship God?
The answer is, God has to be worshipped for getting rid of maya. The thing is, just like God and jivas are eternal, so also there exists a third entity which is eternal. It is called maya and it is another energy of God (please see this answer for maya). Due to the existence of this third entity called maya, jiva has been eternally separated from God and forgetting its true blissful nature, revolving in various kinds of bodies and experiencing pain, pleasure, happiness, distress, etc. from time to time again and again.
Because jiva, due to the influence of maya, is unaware of its true self, considering the body to be his real identity he is doing actions of different kinds and getting bound by sins, virtues, etc. caused by those actions. And by worshipping or surrendering to God one can easily get rid of his bondage causing sins. So the Gita says:
sarva-dharmān parityajya mām ekaṁ śaraṇaṁ vraja
ahaṁ tvāṁ sarva-pāpebhyo mokṣayiṣyāmi mā śucaḥ [BG - 18.66]
Abandon all kinds of dharma and just surrender unto Me. I shall give your liberation from all sins. You need not worry.
It is a common experience of all that everyone does everything for the purpose of getting happiness and pleasure. But due to effect of maya (ignorance) one doesn't know where the real happiness is. So he is looking for it here through various kinds of activities driven by his personal nature. But no matter what a jiva does, it never gets that ultimate happiness and peace. This has been going on eternally and the jiva is bereft of the bliss and happiness he has always been longing internally. So only by getting rid of maya that a jiva can achieve God and get the happiness and bliss he is looking for. It is because God is bliss Himself and by attaining God one becomes blissful:
anando brahmeti vyajānāt [Tait. Up - 3.6]
- Brahma is bliss, thus I (Brhigu) realized.
raso vai saḥ , rasa hyevāyaṃ labdhvā ānandī bhabati [Tait. Up - 2.7]
- He is the sweet mellow. Obtaining this mellow one becomes blissful.
So maya has to be got rid at any cost so that a jiva can fulfil its actual purpose of attaining liberation and bliss. And only he who worships God gets rid of maya, no one else. So the Gita says:
daivī hy eṣā guṇa-mayī mama māyā duratyayā
mām eva ye prapadyante māyām etāṁ taranti te [BG - 7.14]
This divine energy of Mine, consisting of the three modes of material nature, is difﬁcult to overcome. But those who have surrendered unto Me can easily cross beyond it.
Because maya is divine and God's power, only He can withdraw it from a jiva. The jiva can't do it himself. So once one realizes the reason for worshiping God, he can follow the different paths that exist for attaining liberation. But regardless of whatever path he follows, devotion to God will always be required at one stage or the other in his spiritual progress.