The purpose of our existence as human beings is to serve our Lord and Creator in a manner which pleases Him. God (Allah) says in the Qur'an, "I did not create jinn and mankind except that they should worship Me." (Quran 51:56). Worship or service is understood as submission to God by sticking to His Commandments while doing so in the manner He prescribed and is pleased with.
This worship is the exclusive right of God, due to His bringing us into existence and providing our sustenance. God says in the Qur'an, "O mankind! Worship your Lord, Who created you and those who were before you so that you may become pious. Who has made the earth a resting place for you, and the sky as a canopy, and send down water (rain) from the sky and brought forth therewith fruits as a provision for you. Then do not set up rivals unto God(in worship) while you know (that He Alone has the right to be worshiped)." (Quran 2:21-22)
We as human beings are not here without any purpose, obligation or accountability. On the contrary, our lives have value and we will be held accountable to how we lived them in fulfillment of the purpose of our existence. God says in the Qur'an, "Did you think that We had created you in play (without any purpose), and that you would not be brought back to Us?" (Quran 23:115).
As for why God did all this, He says in the Qur'an, "And your Lord creates whatever He wills and chooses." (Quran 28:68) and "And God does whatever He wills." (Quran 14:27).
Comments
I don't understand why you think God does not love us enough to give us a purpose that makes us happy. Matthew 7:9 Or what man is there among you who, if his son asks for bread, will give him a stone? Do you not realize God loves us? If we delight in the lord he will give us all we desire. Therefore, the purpose we desire will be our purpose. He would not make us unhappy with a purpose we do not desire.
Here are two links below:
1. https://sekharpal.wordpress.com/2016/02/14/why-does-the-universe-exist/
2. https://sekharpal.wordpress.com/2016/02/07/why-did-god-create-the-universe/
http://worldnyou.com/the-world/
Satisfactory upto an extent.