Jacob says that God gave him a commandment to keep the history of his people.
Jacob 1:2-3, The Book of Mormon, (Salt Lake City: The Church of Jesus Christ of Latter-Day Saints, 2013), accessed November 29, 2021
And he gave me, Jacob, a commandment that I should write upon these plates a few of the things which I considered to be most precious; that I should not touch, save it were lightly, concerning the history of this people which are called the people of Nephi.
For he said that the history of his people should be engraven upon his other plates, and that I should preserve these plates and hand them down unto my seed, from generation to generation.