Does a PhD thesis have to be theoretical?
While doctoral degrees in some specialized fields have a different designation, you can get a PhD in many non-scientific fields. English Literature or Philosophy to name just two. 

But even in those other fields, a dissertation is normally theoretical in some sense appropriate to that field. Many are more like mathematics, actually, extending a thread of thought, rather than gathering data and applying statistical methods or other tools. 

I question the premise that most CS dissertations are "product development" actually. None of them in my particular purview have been. All have contributed to knowledge, though that knowledge can often be commercialized in some way. 

Some CS research in the language area results in the development of a new language, of course, but that doesn't mean a commercially viable language. They are normally written to test out some ideas of semantics or implementation and so really do extend the range of human knowledge. 

But CS, in general, has been concerned for a long time with building things, so research that is closer to the "real world" is natural. But companies find it difficult to justify doing "pure research" that can't be turned into a revenue stream in a predictable way. That sort of thing is left to universities and to doctoral students. 

And, of course, there are many CS topics if that is your chosen field. You can be as theoretical as you want to be. Some subfields are nearly indistinguishable from mathematics.