In the medieval university system, there were four fields of knowledge: medicine (MD), law (Juris Doctor, or JD), theology (ThD), or philosophy (PhD).
In the centuries since, new kinds of knowledge were discovered, but they generally got squeezed in as sub-categories of philosophy, so when you specialise in them, you get a PhD.
In the centuries since, new kinds of knowledge were discovered, but they generally got squeezed in as sub-categories of philosophy, so when you specialise in them, you get a PhD.