Writing history is more difficult than writing mathematics. In mathematics, you can always improve the way things are done if you are dissatisfied. There is some inner core of material that has some intrinsic reality, but in the end mathematics is largely a human invention.

You don't get to improve history. Nor should you want to. The way things actually happened is always more interesting than the way someone feels they might or, in a reasonable world, would have happened. The whole point of history is to recount how and why things happened the way they did. In the history of mathematics, this translates to the problem of understanding the historical development of ideas.

Many mathematicians (and for that matter other scientists) don't understand this - they often write about things as they feel they should have been, rather than the way they were. This short changes truth.

What historians do get to do is change the interpretation of what facts they get. Very often the facts themselves say little. But it is important to separate fact from interpretation.