@frogman
I agree with you on all counts, especially AI versus human creativity. And thank you for the information on the 60,000-year-old Neanderthal flute, with a diatonic scale no less! I had either not heard of it or forgotten that I had heard about it. Perhaps the Neanderthals gave Homos sapiens the gift of music. So many of us seem to have a certain amount of Neanderthal DNA. It does not really matter, though, in regards to my main interest. Why was music and other arts created in a world where survival was of utmost importance. Why did humans need to create art. I think that question will lead to what @mahgister calls the spirituality in art.
I have watched over the years a TV series called "Closer to Truth." A trained neurologist (and it seems so much more) named Robert Lawrence Kuhn takes up a philosophical and scientific question for six 1/2-hour episodes. One question was about art and religion. I cannot remember the name of the institute he visited that studied art and religion. One of the researchers there said that in ancient humans--upper Paleolithic Homos sapiens--art and religion were the same. Those people made no distinction between the two.
It's probably clearer in the visual arts, since we have entire paintings and carvings from ancient times. In the book "The Mind in the Cave" by David Lewis-Williams, an archaeologist who has studied ancient caves, Lewis-Williams claims that these caves with early cave paintings were "churches." He has physical evidence to make these claims. He says that the animals drawn on these very early cave walls were not animals that were hunted for food. They were distant animals who were seen as "gods." It would take a thesis to explore this, so I'm just going to take it as fact for now.
The point I want to make is that all art must have been extremely important to early humans or else they wouldn't have spent precious time normally used for survival creating and exploring art. I would say that if this argument is true, then early music, as well as the visual arts, would have been "spiritual" in some sense. And this is what we feel today, even those of us like myself who don't believe in traditional religion. And perhaps this is what @mahgister looks for when he talks about spirituality in music.
I think music, as well as all of the arts, have branched out into things other than just spirituality, such as entertainment. In the Greek Golden Age (beginning around the 7th century BCE) we find plays about the gods as well as humorous plays that must have been for entertainment. And, of course, most of the arts are for entertainment today, especially music. But when a piece of music does appeal to the "spiritual" many people can hear it and feel it. I have not yet listened to Phillip Glass's "Akhnaten, but I have heard other Phillip Glass pieces that have that spiritual quality. And, of course, in jazz we can hear pieces that entertain and others that appeal to a more spiritual aspect of humanity.
This is a topic I am much interested in.