The material has a traceable ancestry. The Pyramid Texts of the Old Kingdom were royal. In the Middle Kingdom much of that stock, reworked and greatly expanded, appears painted inside the coffins of officials and their families as the Coffin Texts. From the Coffin Texts, and from newer compositions, the Book of the Dead emerges on papyrus in the Second Intermediate Period and Eighteenth Dynasty. The direction of travel is downward through society: what had been the prerogative of a dead king became available to anyone who could pay a scribe.
New Kingdom copies are collectively called the Theban recension. The label is a convenience rather than an edition, because in this period there is no fixed order and no fixed contents, the selection and sequence vary from roll to roll, and the hieroglyphs may run in either direction. That changes in the Twenty-sixth Dynasty, ruling from Sais, when a standard sequence and a standard selection settle into place and persist with little variation into the Ptolemaic period. This is the Saite recension, and it is what makes a numbered edition possible at all.
Lepsius worked from a late papyrus of that standardised type, Turin 1791, and assigned numbers 1 to 165 to the spells he found in it. Later scholars extended the numbering as further spells turned up outside his manuscript, taking the total past 190. The numbers are therefore an artefact of nineteenth-century editing imposed on a corpus that never had them, and an Egyptian owner of a New Kingdom roll would not have recognised the ordering of any modern translation of his own text.