First of all, as you said, history is written by people, and people make mistakes, so some human errors are inevitable. But the official history made almost no mistakes in this respect. Because the official history is generally strictly audited by special departments during the writing process and after completion.
Second, with the passage of time, some historical facts can no longer be known in detail. So there will be some authors' fabrications. For connection and wonderful content.
The third and most important reason. It's just that some historical facts are sensitive to the current dynasty. It is not excluded that historians are forced by current political pressure to tamper with or deliberately not write some content. This is also the main reason why many historical studies are taken from unofficial history.
For example, I said Sima Qian, whom everyone knows.
Sima Qian wrote "Xinlingjun Stole Symbols to Save Zhao", saying that an assassin of Xinlingjun assassinated Wei Jiangjin and hid an iron cone weighing 80 Jin in his sleeve. This is obviously unreasonable. Not to mention whether the sleeves can bear the weight of 80 kilograms. It is obvious that only the other person is not blind when wearing 80 kilograms of heavy objects.
Sima Qian wrote in great detail the plot between Zhao Gao and Reese after the death of Qin Shihuang. What he said, what he did, and the psychology of the characters are all written in detail. But we know that Brother Sima can't be so familiar with what happened over 100 years ago. Even contemporary people are not so clear about their "conspiracy".
Liu Bang hated Xiang Yu, so the records of Xiang Yu in the Western Han Dynasty were very obscure. So at this point, the records about Xiang Yu in Historical Records are very limited. In particular, there is no positive record of its advantages and military leadership.
Incidentally, Sima Qian was also the only ancient historian in China who dared to record the history of this dynasty. This is his greatness. Because many things in the history of this dynasty can't be said or made up.