Providing entertainment is useful value. How many thousands and thousands of years back do you need to look to finally hit a point where there is absolutely no evidence of some form of entertainment being "produced."
Hell there are even animal bone "flutes" for making music going back to like the neanderthals or something like that.
We need to stop with this "if it doesn't lead to making money it has no place in society" nonsense.
Edit: I think you can actually see the divergence between extracting value from games (AAA devs absolutely ruining their reputation seeking profit over entertainment) and creating entertaining games.
The same reason the literal entirety of society exists. After we completely figured out food, water, and shelter, we got bored.
We stopped being at risk of famine 10k years ago, we pretty quickly figured out fermentation and distillation makes water not kill us, and we figured out how to house everyone.
Then we kept just making that faster and easier to accomplish.
Well what do we do with all that free time? Fuck play games, do some entertainment, kill other people over petty nonsense, create pointless class based societies that generate artificial scarcity simply because a few people are greedy and most are too trusting of those greedy people, enrich out lives through momentary joy.
So in the dark ages of computing this tradition was continued and a very smart, highly paid scientist in charge of tens of millions of dollars of equipment made some of that equipment play table tennis.
A few decades and massive corporate funding of naive over enthusiastic nerds with much cheaper but more powerful equipment later and we have video games instead of going to the pub to play dice or doing a war..
An excellent philosophical question, that we all ask ourselves at some point - why do we play?
I'll answer your question with one of my own: what is productive labour for after all? To allow for more productive labour?
I could cite some evolutionary hypotheses about how we came to enjoy play and beauty for their own sake, but that doesn't tell you what we ought to value.
For my own part I think thoughtfully maximising life's pleasures is a good goal (though I would rank diminishing pain as higher priority).