A PhD is a degree in doing R&D, with an emphasis on the R. A thesis is just a demonstration that this set of skills was acquired in a discipline.
Just like how people check out your GitHub repository to see if you are a capable coder, people check out your refereed publication record to determine if you can do research. It's possible to build up a record of publications without a PhD, but it is a hard skill to acquire on your own.