lokavat tu lila kaivalyam [Brahma Sutras - 2.1.33]
The creation is merely a sport of Brahman.
So does it look like God created us for fun?
Yes, Adi Shankaracharya said that creation is a mere sport of Brahman, without a deeper motive behind it; here is what he says in his commentary on the Brahma Sutras:
Analogously, the activity of the Lord also may be supposed to be mere sport, proceeding from his own nature 1, without reference to any purpose. For on the ground neither of reason nor of Scripture can we construe any other purpose of the Lord. Nor can his nature be questioned 2--Although the creation of this world appears to us a weighty and difficult undertaking, it is mere play to the Lord, whose power is unlimited. And if in ordinary life we might possibly, by close scrutiny, detect some subtle motive, even for sportful action, we cannot do so with regard to the actions of the Lord, all whose wishes are fulfilled, as Scripture says.
It should be kept in mind, however, that in Advaita the physical world is illusory, so this sport wouldn't represent the true nature of reality.
Ramnujacharya also says, in his Sri Bhashyam, that it's a sport without motive:
The motive which prompts Brahman--all whose wishes are fulfilled and who is perfect in himself--to the creation of a world comprising all kinds of sentient and non-sentient beings dependent on his volition, is nothing else but sport, play. We see in ordinary life how some great king, ruling this earth with its seven dvîpas, and possessing perfect strength, valour, and so on, has a game at balls, or the like, from no other motive than to amuse himself; hence there is no objection to the view that sport only is the motive prompting Brahman to the creation, sustentation, and destruction of this world which is easily fashioned by his mere will.
But from this it should not be concluded that Brahman is being capricious in giving us different life experiences. That is to say, although Brahman has no motive in creating the world, he still has some criteria, particularly the law of Karma that determine who experiences what rewards and punishment. Here is what Adi Shankaracharya says in his commentary on the next Sutra:
The Lord, we reply, cannot be reproached with inequality of dispensation and cruelty, "because he is bound by regards." If the Lord on his own account, without any extraneous regards, produced this unequal creation, he would expose himself to blame; but the fact is, that in creating he is bound by certain regards, i. e. he has to look to merit and demerit. Hence the circumstance of the creation being unequal is due to the merit and demerit of the living creatures created, and is not a fault for which the Lord is to blame. The position of the Lord is to be looked on as analogous to that of Parganya, the Giver of rain. For as Parganya is the common cause of the production of rice, barley, and other plants, while the difference between the various species is due to the various potentialities lying hidden in the respective seeds, so the Lord is the common cause of the creation of gods, men, &c., while the differences between these classes of beings are due to the different merit belonging to the individual souls. Hence the Lord, being bound by regards, cannot be reproached with inequality of dispensation and cruelty.
Ramanujacharya says the same thing:
But the assumption of his having actually created the world would lay him open to the charge of partiality, in so far as the world contains beings of high, middle, and low station--gods, men, animals, immovable beings; and to that of cruelty, in so far as he would be instrumental in making his creatures experience pain of the most dreadful kind.--The reply to this is 'not so, on account of there being regard'; i.e. 'on account of the inequality of creation depending on the deeds of the intelligent beings, gods, and so on, about to be created.'--Sruti and Smriti alike declare that the connexion of the individual souls with bodies of different kinds--divine, human, animal, and so on--depends on the karman of those souls
Note that insofar as we may have been created without a motive, that's just a natural consequence of the fact that Brahman has no unfulfilled desires, and thus does not have motives. It does not mean that our life is without meaning or purpose. It does have meaning, insofar as the Lila of Brahman is divine in its excellence and beauty, and we are privileged to participate in it. And we do have a purpose - to attain Moksha (liberation).
Modern Scientific thinking is in line with this thinking .
The Visible Universe contains about a hundred billion Galaxies . Each Galaxy may contain a hundred billion stars , similar to the Sun . The Sun is 3.3 lakhs as massive as the Earth . There may be many more Universes like Ours , which are Invisible to us.
What does this show ? All Human activities on Earth have no impact on, and are of no use to , the Universe. So why has God or Nature , created this complex web of life on Earth ? There seems to be no motive . " Akarana".
"Na-me Partha:sti Katavyam Trishu Lokeshu Kinchana : Nanavaptam Avaptavyam , Varta-eva cha Karmani " --Geeta .
"Arjuna-I have no Duty , nothing to Achieve , nothing impossible to achieve .Still I keep myself busy --to serve as a model to others."