My experience was quite different from that of OP, and I suspect most people who walk that path. I'm 56 in a few days, and got my PhD in computer science in 1983. I was lucky enough to go to a high school that had a real computer, a PDP-8M, and I was hooked five minutes after I sat down at the DecWriter.

At college, I was theoretically pre-med. A month into my freshman year (1974), I went to a party at the house of a revered EE professor, who happened to be a friend of the family. I was talking with someone, another professor, about my interest in computers, and he told me in no uncertain terms that there was no future in that. I was crushed. I was seriously bummed out for weeks. But it was what I loved to do, so I kept doing it, taking whatever courses were available, and hacking on my own projects.

I cleverly sabotaged all my medical school interviews. My interviewers were able to detect my lack of interest in medicine and my great enthusiasm about computers, and wisely rejected me.

I graduated, and wanting to do nothing but play with computers, I got a job in NYC, writing software, and because that wasn't enough, I also went to grad school at night. I decided to do a PhD because that seemed like the best way to keep playing with computers. My thought process was really that shallow. I wasn't thinking about industry vs. academe, future earning potential, or any other practical matters. I saw that I wouldn't finish my PhD while working, so I decided to do grad school full time.

I was lucky enough to choose McGill for grad school, after leaving New York. I sort of just fell into it, because I had gone there undergrad, I liked it, and my girlfriend was going there for medical school. I was lucky in the sense that it was perfectly suited to my personality. It wasn't a funding powerhouse, but between teaching and research funds, a student could support himself easily. My PhD adviser was a wonderful man, low-key, with some fun things he was investigating, but he wasn't building an empire, built on the backs of enslaved grad students. We were just looking at interesting problems together.

I graduated, and taught at UMass/Amherst for two years. And then it hit me. What a grad student was supposed to do, and what a faculty member was supposed to do. A faculty member starts building his empire, with insane focus on getting tenure. He or she gets tenure and builds a bigger empire, and spends an inordinate amount of time chasing funding. Grad students do the fun work, working very hard, for a very long time. I had no idea how to play this game, and no interest.

I left, and a few years later found myself at my first startup. It was similar to UMass. Instead of professors, there are entrepreneurs, insanely focused, and whose main job it is to get money to fund the work. Instead of grad students are the early employees, who make the vision real. I was much happier as an early employee, being a low-key introvert, who loves technical problems more than business problems. My PhD caused some large degree of distrust -- if I have that background, I'm obviously interested in writing academic papers more than writing software. But I still loved playing with computers, and startups are a great place to do that. I wrote a lot of software.

Epilogue: At my current startup, a number of our customers have a problem that happened to be exactly in the area of my PhD research. I spent a very enjoyable few weeks implementing my PhD thesis for these customers. 30 years later, my PhD ideas finally shipped.

tl;dr: I did a PhD to keep doing what I was drawn to. My career has been incredibly rewarding, and even charmed, and it is so atypical (I think) that I can't advise anyone to pursue a PhD based on my experience.