An encyclopedia was a course of study long before it was a book.

The Greek phrase is enkyklios paideia. Enkyklios is built from en, "in," and kyklos, "circle," the source of English cycle. It means "circular" in the sense of general. Paideia means "education" or "child-rearing," from pais, "child." Put together, they described the circle of arts and sciences that made up a liberal education, the seven liberal arts a free citizen was expected to learn.

The odd part is how the phrase became one word. Etymonline says the form encyclopaedia was probably a misreading. It reports that Latin authors may have taken the Greek phrase as a single word meaning "general education," and calls this a likely misreading. That is a hypothesis, not a settled fact. Other accounts treat the phrase as ordinary Greek educational vocabulary, which Quintilian used for the subjects an orator should study first. What is clear is that Modern Latin had encyclopaedia by about 1500.

English first used the word in the 1530s, still with the old meaning: a general course of instruction. It was a way of learning, not a thing on a shelf.

The book sense came later. Merriam-Webster dates the reference-work meaning to 1644, and Etymonline puts the alphabetical reference work in the 1640s. The idea behind it is much older. Etymonline reports that Cato the Censor compiled an early encyclopedia around 185 BCE, now lost, summarizing learning for general instruction. Those early works were in Latin.

The word then gained its modern prestige from France. Etymonline notes that it was often applied to the Encyclopédie ou Dictionnaire raisonné des Sciences, des Arts, et des Métiers, published from 1751 to 1765.

The first Modern Latin form, encyclopaedia, dates to about 1500, and English spells the word both with and without the ae.

So the book that tries to contain everything was named for a circle, and probably for a mistake.