But, why did God give us free will in the first place, if all He wanted us to do with it was submit it to his?
I think the answer can be summed up simply as "We are to be tested by Him before we can be admitted to His good company." The Qur'an makes numerous references to the fact that Allah (swt) will test us in various ways prior to our deaths.
Be sure we shall test you with something of fear and hunger, some loss in goods or lives or the fruits (of your toil), but give glad tidings to those who patiently persevere (2:155)
Or do ye think that ye shall enter the Garden (of bliss) without such (trials) as came to those who passed away before you? They encountered suffering and adversity, and were so shaken in spirit that even the Messenger and those of faith who were with him cried: "When (will come) the help of Allah." Ah! Verily, the help of Allah is (always) near! (2:214)
And so on and so forth. According to one website, there are 54 ayat that deal with "trials and tests" alone. However, the question then might become, "why should He test us if He wants us to submit to His will?" Allah (swt) says in the Qur'an that:
If it had been thy Lord's will, they would all have believed,- all who are on earth! Wilt thou then compel mankind, against their will, to believe! (10:99)
In which case, what would be the point for mankind? Where is the merit in having striven during one's life? In Islamic theology, it is supposed that the angels have no independent will of their own, that they act and obey without any will or capacity to disobey. (Iblis (Satan), who refused to bow down before Adam (pbuh), is said in 18:50 to be of the Jinn and not a fallen angel as in Christian theology.) If Allah (swt) had wanted, presumably, mankind would not have been needed as He has all the angels He wants who are created to obey. In one hadith:
Abu Ayyub Ansari reported that Allah's Messenger (may peace be upon him) said: "If you were not to commit sins, Allah would have swept you out of existence and would have replaced you by another people who have committed sin, and then asked forgiveness from Allah, and He would have granted them pardon." (Muslim; #37.6621)
So, He wants us to be around, to strive (jihad) so that we may join Him in the hereafter. In which case, we are then given the choice as to whether to accept Him and His message or not:
Say, "The truth is from your Lord": Let him who will believe, and let him who will, reject (it)... (18:29)
We do have free will to make this choice, although that free will is not unlimited.
(With profit) to whoever among you wills to go straight: But ye shall not will except as Allah wills,- the Cherisher of the Worlds. (81:28-9)
As Yusuf Ali wrote in part in his commentary to this verse:
Allah is the Cherisher of the Worlds, Lord of Grace and Mercy, and His guidance is open to all who have the will to profit by it. But that will must be exercised in conformity with Allah's will (verse 29). Such conformity is Islam. Verse 28 points to human free will and responsibility; verse 29 to its limitations. (Footnote #5996)
Insha'allah, I hope this helps to answer your question. Wa allahu alim. (And God knows best.)