This style of PhD is a lifestyle choice and a vow of "poverty". For context, at a school like MIT or Berkeley a typical fully-funded stipend is about $30k USD annually (gross), which you will make until you finish (at age 27-30, depending on when you start). Once you run through the cost of living in the area, you start to see that some compromises must be made to your quality of life. If you have independent money these compromises are less necessary, but if you are not careful it can alienate you from peers, in the same way that having money generally means you live in a different world than others.
If your goal in a career is to make enough money or have enough stability to support your actual life (family, community, hobbies, etc), doing a PhD is not a particularly reliable path. Having one opens doors in life, but you have to value that over the alternative for the decision to make sense.
(I have a chemistry PhD)
Your experience can be very different in countries that see junior researchers as professionals. You get a solid middle-class salary, and while you earn less than your friends who went to the industry, your life is not qualitatively different from them. Some travel extensively during their PhD, while others have kids and buy a home.
The opportunity cost for doing a PhD is much lower in the latter system.
I believe there is an even bigger issue, that is not quantified or discussed, which is that PhD programs have extremely high attrition. Things can go wrong, which result in either having to quit or start over. Your advisor could lose finding, change jobs, or die. You could get sick. I know two people who got into serious ethical disagreements with their advisor. One had to lawyer up. At least when you read stories about jobs from hell in industry, you know that the person can at least walk away with the money that they already earned.
The non-PhD career path involves assumptions too. Having marketable skills, getting a lucrative job, moving up in the ranks, and putting money away, are all hypotheticals with their own survivor bias issues.
Disclosure: Physics PhD.
https://medium.economist.com/why-doing-a-phd-is-often-a-wast...
In many non-European, non American countries, a PhD is three years after your undergraduate (with honors year, 4 year undergraduate instead of the normal three).
Very different equation.