I had a ton of fun in my PhD. It probably wasn’t the best route if I was trying to maximize total lifetime earnings, but I’m happy with the route I took.
In fact I liked it enough that I often joke that my retirement plan will be to get into another PhD program for the stipend/insurance and just do projects to help some junior prof get their career going