> You can generally exit at any time and immediately transition into lucrative careers in, for example, tech and finance.
This is what's known as a "dick move" in academia, and it's a good way to burn bridges. Generally, the academic who is putting down the money to pay your tuition and stipend is making an investment. In return for a free education and $30k per year, you do research, you study, and eventually you are expected to graduate. Good academics will make sure you don't fail at this. Then, when the academic goes up for tenure or promotion, the committee will be looking at among other things, the students who graduated under their tutelage. If you decide you'd rather not stick it out, that's potentially years of work they invested in you, gone.
All in, a graduate student can cost an academic upwards of $50-100k per year, and they are typically expected to foot that bill for at least 4 years, up to a max of 10. To get this money, the academic needs funding from grant agencies, whose funding rates can be as low as 20%. When submitting a grant proposal, academics generally do so with a particular student in mind who will do the research. If you leave in the middle of the grant, it likely spells failure (or at the least a huge setback) for the project, and possibly future grants, as it's too late to train up a brand new student to the point you were at.
Just something to think about before entering a Ph.D. program. Remember these communities are small and have a long memory. Best not start something unless you really are committed, and won't just pack up shop at the first hint of dollar signs from Wall Street or Silicon Valley.