In one's early education, especially in more traditional contexts, learning involved X being true because the teacher said so. Don't question the teacher; just make sure that you know X. It was all about memorization (rote learning).
This would start to change when a student would reach the highest levels of education, at which point they'd be able to argue and contribute their own understanding. So instead of focusing on rote learning, a student would have to demonstrate their ability to think and engage in critique of their field (scholasticism). This is, successful students would become philosophers of their field rather than simple repositories of memorized facts.
Education's become increasingly liberal with a shift from rote learning toward critical thinking, but there's still a semblance of that early expectation that pre-Ph.D. students are supposed to memorize what's being taught while a Ph.D. would symbolize one's ability to go beyond that.
Historical background
Academics used to be folks who participated in medieval universities. There was a heavy religious flavoring to academia compared to today's more secular settings, but it was still general academia nonetheless.
A lot of stuff came from this time. For example, on graduation when you dress up like Harry Potter, it's because that's how these guys used to dress.
Anyway, so this is where the Bachelor's/Master's/doctorate thing came from:
Course of study
University studies took six years for a Master of Arts degree (a Bachelor of Arts degree was awarded after completing the third or fourth year). Studies for this were organized by the faculty of arts, where the seven liberal arts were taught: arithmetic, geometry, astronomy, music theory, grammar, logic, and rhetoric. All instruction was given in Latin and students were expected to converse in that language. The trivium comprised the three subjects that were taught first: grammar, logic, and rhetoric. These three subjects were the most important of the seven liberal arts for medieval students. The curriculum came also to include the three Aristotelian philosophies: physics, metaphysics and moral philosophy.
-"Medieval university", Wikpiedia [links and citations omitted]
And that stuff was a lot of the rote learning, before one was a proper doctor.
After that, one'd go into the realm of philosophy, becoming a more critical thinker (scholar):
Once a Master of Arts degree had been conferred, the student could leave the university or pursue further studies in one of the higher faculties, law, medicine, or theology, the last one being the most prestigious. A popular textbook for theological study was called the Sentences (Quattuor libri sententiarum) of Peter Lombard; theology students as well as masters were required to write extensive commentaries on this text as part of their curriculum.[citation needed] Studies in the higher faculties could take up to twelve years for a master's degree or doctorate (initially the two were synonymous), though again a bachelor's and a licentiate's degree could be awarded along the way.
-"Medieval university", Wikpiedia [links and citations omitted]
This system was already established by the time "science" started to be recognized in a more modern sense. At that time, it was still just Philosophy, or more specifically "Natural Philosophy".
So, to be a "doctor of philosophy" is literally just that - to be a scholar of philosophy who's gone beyond the intro years of rote memorization to the point where they can engage in scholarly critique of their field.
Ph.D.'s as further Master's degrees
In the historical context in which these degrees were named, the human knowledge pool was way, way smaller. It was a drop compared to today's oceans. And so, the prospect of learning much of the human knowledge pool was far more reasonable, if many'd still have regarded it as challenging.
Today, a lot of Ph.D.'s are awarded to students who probably don't quite get the whole philosophy-of-their-field thing. That seems to be a natural consequence of there being a lot more one can learn before reaching the point of critique and abstraction.
So, today, a Ph.D. can be something like a fancy Master's degree. For example, one can basically get a Master's in Chemistry, then do a bunch of lab work to test something out, and get a Ph.D. for that (experimental chemistry).
In principle, we might argue that there's some need for revision to the academic credentialing system to better capture its modern reality. And we've actually kinda done that already - as noted in the Wikipedia link above, a Master's and doctorate used to be the same thing; they got more separated in part due to the human knowledge pool growing and more ranks being needed to account for it. But that'd be a different topic.
For the purposes of this question, a Ph.D. got its name in the scholarly days when academics were basically those who learned their field and then engaged in scholarly critique of it. And today, the name's kinda a historical artifact.
Further reading
I found a neat paper that discusses the evolution of doctoral conference since the scholarly days:
This document's a look at what scholastics/academics had to do to be recognized as a doctor. And while the title specifies "On Dissertations", it notes:
Less than a century ago a dissertation was not always required to obtain a doctorate. Successfully defending a number of theses sufficed. [-page 7]
Other interesting factoids:
Apparently dissertations used to be more about disputing (critique) points, written up as a disputation. This contrasts with the modern description of a PhD being about adding to the human knowledge pool.
It seems like prior academia was far more concerned with religion than modern academia. Early academics seem to have been something like clergy.