It was better than doing a startup by a stupidly huge margin. Startups are all about risk-minimization and risk-mitigation, since risky things mostly fail, and so use up your runway without moving you closer to success. So in a startup you are highly incentivized not to take big risks -- and research is always a risk. So you are driven to take an engineering mindset, where the apex of skill is to solve a new problem using only old, entirely proven techniques.
In contrast, after my first project as a PhD student, my advisor straight-up told me that I needed to shed the engineering mindset to succeed. Inventing new techniques was the goal, and so you need to adopt a mentality of confronting problems head on (rather than designing the system to avoid confronting them).
Basically a PhD puts you in an environment where you can take on big, poorly-understood and poorly-defined problems and attack them over and over again. Going from a blank sheet of paper to a solution (or clear failure) in six months 10 times over is an amazing way of improving your skills, and IME it's really hard to get this experience in industry (even though it's really valuable to have this experience in industry).