A PhD teaches you how to think, how to learn, and how to question the world. That's a vital set of skills no matter what tool exists.
I think there are many answers to this, not the least of which is that AI can’t really do it instead.
If that comes to pass, I guess there won’t be any economic cost to having done my PhD because the entire economy will be AI driven and we’ll hopefully just be their happy pets.
If that doesn’t come to pass, and AIs just remain good at summarizing and remixing ideas, I guess people with experience generating research will still be useful.
I liked my job at the university - independent of the final PhD. I enjoyed what I was doing. Most of the time I also enjoyed writing my dissertation, since I was given the opportunity to write about my stuff. And mostly I could write it in a way how I felt things are supposed to be explained.
Why go to the gym if you don't need physical strength? One needs to do something to not degenerate into a miserable state.
I find it very fulfilling to do a PhD and did so myself. More people should. What I mean is that I'm expecting the general view on it to evolve as described.