How did the history books come down after so many years?

I think there are the following channels:

First, the author had become a celebrity at that time, and his works were recognized by the society. History books or historical archives are kept. Examples such as Zuo Zhuan, Historical Records and The Analects of Confucius have been handed down not only by themselves, but also by many people's stories and works.

Second, places of interest are well preserved. Some ancient people like to leave words and write poems when visiting places of interest. Mo Bao of some famous people will also be preserved by stone carving, which is also an important channel for the spread of ancient poetry.

Third, local chronicles. Local chronicles generally have "literary and artistic records". The works of some famous people in a certain region or county may not be well-known at that time, but they are kept in the "literary chronology" of local chronicles and are discovered and praised by later generations.

Fourthly, genealogy and family preservation. Some scholars love writing books and painting, but they don't like publicity. They often pass on their works to future generations for safekeeping. Others are included in the genealogy and passed down.